Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejkocylapc committed Dec 23, 2024
1 parent fa06aee commit 944ff65
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/views/public/api_documentation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<li><a href="#auhentication">Authentication</a></li>
<li><a href="#ping">Server Ping</a></li>
<li><a href="#ping-times">Ping Times</a></li>
<li><a href="#ping-time-stats">Ping Time Stats</a></li>
<li><a href="#validators-list">Validators List</a></li>
<li><a href="#validator-detail">Validator Details</a></li>
<li><a href="#validator-block">Validator Block Production History</a></li>
Expand Down Expand Up @@ -109,6 +110,35 @@

<hr />

<h2 class="h4" id="ping-time-stats">Ping Time Stats</h2>
<p>
The ping-time-stats endpoint will return overall stats for the ping times as reported by the participating validators. By default the most recent 100 ping time stats will be used.
</p>
<h3 class="h6">Request:</h3>
<pre>curl -H "Token: secret-api-token" '<%= @api_path %>/ping-time-stats/:network.json'</pre>
<h3 class="h6">Parameter Options:</h3>
<p><strong class="text-muted">`limit=NN`</strong> will limit the results to NN entries, defaults to 100 (max 9_999).</p>

<h3 class="h6">Response:</h3>
<p>An Array of ping time stats.</p>
<pre>
[
{
"batch_uuid": "baf5c581-7ca3-471f-9a86-17a4f3c904a3",
"overall_min_time": 101.778,
"overall_max_time": 101.872,
"overall_average_time": 101.803,
"observed_at": "2024-12-18 10:34:06.984608000 +0000",
"created_at": "2024-12-18 10:34:26.984608000 +0000",
"updated_at": "2024-12-18 10:34:26.984608000 +0000",
"network": "testnet"
},
...
]
</pre>

<hr />

<h2 class="h4" id="validators-list">Validators List</h2>
<p>
The Validators List endpoint will return a list of validators for the requested network. In the example below,
Expand Down

0 comments on commit 944ff65

Please sign in to comment.