aboutsummaryrefslogtreecommitdiffstats
path: root/docs/openapi.yaml
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-30 17:42:26 +0100
committertv <tv@krebsco.de>2026-10-30 17:42:26 +0100
commitf65ecfdf313658a3979a2d0add53e342ce4b97df (patch)
tree57320539da53c39c3d0d37870f0f65ba33ca7fc8 /docs/openapi.yaml
parentb224eee76a9314992ec7a83321803e11a0b0b37f (diff)
add dashboard
Diffstat (limited to 'docs/openapi.yaml')
-rw-r--r--docs/openapi.yaml59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
index a2ca2f4..ad3b3c8 100644
--- a/docs/openapi.yaml
+++ b/docs/openapi.yaml
@@ -470,6 +470,65 @@ paths:
'401':
$ref: '#/components/responses/Unauthorized'
+ /admin/dashboard:
+ get:
+ tags: [Admin]
+ summary: Dashboard page
+ description: |
+ A page showing this node's figures (`/admin/stats`), its peers (`/peers`) and a
+ map of the swarm, live through `/admin/dashboard/events`. Only in builds with
+ the `dashboard` cargo feature (else `404`).
+ responses:
+ '200':
+ description: The page.
+ content:
+ text/html:
+ schema:
+ type: string
+ /admin/dashboard/state:
+ get:
+ tags: [Admin]
+ summary: Dashboard state
+ description: |
+ The dashboard's latest snapshot: `node` (`id`, `alias`), `stats` (as
+ `/admin/stats`), `peers` (as `/peers`) and `graph`: `members` (by node ID:
+ `alias`, `self`), `intended` (by node ID: the neighbours the member list gives
+ it, as this node computes them) and `measured` (by node ID: `secsAgo` and
+ `links`, each with `peer`, `transport`, `relayed`, `rttMs`, `dormant`, as the
+ member answered a LINKS; ours always, the others' while fresh). One producer
+ per node makes it every 2 s while anyone looks (and for a minute after this
+ request), asking members for their links every 30 s; every client gets the
+ same. Only with the `dashboard` cargo feature.
+ responses:
+ '200':
+ description: The snapshot.
+ content:
+ application/json:
+ schema:
+ type: object
+ required: [node, stats, peers, graph]
+ additionalProperties: true
+ /admin/dashboard/events:
+ get:
+ tags: [Admin]
+ summary: Dashboard events
+ description: |
+ Server-Sent Events: a `snapshot` event (the state as
+ `/admin/dashboard/state`) first, then a `patch` event (a JSON merge patch,
+ RFC 7386, onto the state before) whenever something but ages changed, at most
+ every 2 s. Each event's ID is its number. A client that falls behind gets a
+ `snapshot` again. Nothing changed, nothing is sent but keep-alive comments.
+ Ages (`…SecsAgo`, `secsAgo`, `uptimeSecs`, `dormantForSecs`, `observedSecs`,
+ `lastFromNeighbourSecs`, `oldestQuarantineSecs`) are as of the event: they
+ alone changing sends nothing, the client counts them on. Only with the
+ `dashboard` cargo feature.
+ responses:
+ '200':
+ description: The event stream.
+ content:
+ text/event-stream:
+ schema:
+ type: string
/admin/remakes:
get:
tags: [Remakes]