From 1458ea92a41788a0f33e86e621817613f46055eb Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:09 +0100 Subject: dashboard: own links over the API, and CORS GET /admin/dashboard/links/own and its event stream: a node's own links, as LINKS_REPLY carried them, for other members' dashboards with a token. CORS for the members' dashboard origins and --cors-origins, without credentials. Auth plan M3. --- docs/openapi.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'docs/openapi.yaml') diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 64c5b9b..f8fb25d 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1015,6 +1015,41 @@ paths: type: object required: [node, stats, peers, graph] additionalProperties: true + /admin/dashboard/links/own: + get: + tags: [Admin] + summary: This node's own links + description: | + As it measures them: its ID, its epoch, and each link (what the map draws). + Readable by pages of other members' dashboards, with a token (CORS: docs/access.md, Tokens). + responses: + '200': + description: The links. + content: + application/json: + schema: + type: object + properties: + node: { type: string } + epoch: { type: object } + links: { type: array, items: { type: object } } + '401': + $ref: '#/components/responses/Unauthorized' + + /admin/dashboard/links/own/events: + get: + tags: [Admin] + summary: This node's own links, as they change + description: Server-sent events, `links` with what `/admin/dashboard/links/own` answers at once and whenever it changed, `offline` when the node stops. Readable by pages of other members' dashboards, as that is. + responses: + '200': + description: The events. + content: + text/event-stream: + schema: { type: string } + '401': + $ref: '#/components/responses/Unauthorized' + /admin/dashboard/refresh: post: tags: [Admin] -- cgit v1.3.1