From 944ff656ff8643a3d32214b8bf5868561a14f2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kocy=C5=82a?= Date: Mon, 23 Dec 2024 12:39:55 +0100 Subject: [PATCH] update docs --- app/views/public/api_documentation.html.erb | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/views/public/api_documentation.html.erb b/app/views/public/api_documentation.html.erb index 251981405..d81524230 100644 --- a/app/views/public/api_documentation.html.erb +++ b/app/views/public/api_documentation.html.erb @@ -14,6 +14,7 @@
  • Authentication
  • Server Ping
  • Ping Times
  • +
  • Ping Time Stats
  • Validators List
  • Validator Details
  • Validator Block Production History
  • @@ -109,6 +110,35 @@
    +

    Ping Time Stats

    +

    + 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. +

    +

    Request:

    +
    curl -H "Token: secret-api-token" '<%= @api_path %>/ping-time-stats/:network.json'
    +

    Parameter Options:

    +

    `limit=NN` will limit the results to NN entries, defaults to 100 (max 9_999).

    + +

    Response:

    +

    An Array of ping time stats.

    +
    +[
    +  {
    +    "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"
    +  },
    +  ...
    +]
    +
    + +
    +

    Validators List

    The Validators List endpoint will return a list of validators for the requested network. In the example below,