From 38df75fd283c1633875b028c0c5cdefbb823adf3 Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Mon, 26 Feb 2024 15:07:50 +0100 Subject: [PATCH] Add get_selected_routes endpoint to docs/api.yaml Signed-off-by: Lee Smet --- docs/api.yaml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/docs/api.yaml b/docs/api.yaml index 60e40a3f..01a5f68a 100644 --- a/docs/api.yaml +++ b/docs/api.yaml @@ -52,6 +52,26 @@ paths: items: $ref: '#/components/schemas/PeerStats' + '/api/v1/admin/routes/selected': + get: + tags: + - Admin + - Route + summary: List all selected routes + description: | + List all selected routes in the system, and their next hop identifier, metric and sequence number. + It is possible for a route to be selected and have an infinite metric. This route will however not forward packets. + operationId: getSelectedRoutes + responses: + '200': + description: Succes + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Route' + '/api/v1/messages': get: tags: @@ -261,6 +281,38 @@ components: minimum: 0 example: 64645089 + Route: + description: Information about a route + type: object + properties: + subnet: + description: The overlay subnet for which this is the route + type: string + example: 469:1348:ab0c:a1d8::/64 + nextHop: + description: A way to identify the next hop of the route, where forwarded packets will be sent + type: string + example: TCP 203.0.113.2:60128 <-> 198.51.100.27:9651 + metric: + description: The metric of the route, an estimation of how long the packet will take to arrive at its final destination + oneOf: + - description: A finite metric value + type: integer + format: int32 + minimum: 0 + maximum: 65534 + example: 13 + - description: An infinite (unreachable) metric. This is always `infinite` + type: string + example: infinite + seqno: + description: the sequence number advertised with this route by the source + type: integer + format: int32 + minimum: 0 + maximum: 65535 + example: 1 + InboundMessage: description: A message received by the system type: object