From e57c311767b59b1b6ff3bcb65391ff9d71ca0f59 Mon Sep 17 00:00:00 2001 From: zombah Date: Sat, 23 Dec 2017 02:37:33 +0300 Subject: [PATCH] doc: Add list_ospf for API documentation (#7944) Signed-off-by: Misha Komarovskiy --- doc/API/Routing.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/doc/API/Routing.md b/doc/API/Routing.md index 0bd0637973..f65708f648 100644 --- a/doc/API/Routing.md +++ b/doc/API/Routing.md @@ -108,3 +108,43 @@ Output: } ``` > Please note, this will only show active VPN sessions not all configured. + +### `list_ospf` + +List the current OSPF neighbours. + +Route: `/api/v0/ospf` + +Input: + + - hostname = Either the devices hostname or id. + +Example: +```curl +curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/ospf +``` + +Output: +```json +{ + "status": "ok", + "ospf_neighbours": [ + { + "device_id": "1", + "port_id": "0", + "ospf_nbr_id": "172.16.1.145.0", + "ospfNbrIpAddr": "172.16.1.145", + "ospfNbrAddressLessIndex": "0", + "ospfNbrRtrId": "172.16.0.140", + "ospfNbrOptions": "82", + "ospfNbrPriority": "1", + "ospfNbrState": "full", + "ospfNbrEvents": "5", + "ospfNbrLsRetransQLen": "0", + "ospfNbmaNbrStatus": "active", + "ospfNbmaNbrPermanence": "dynamic", + "ospfNbrHelloSuppressed": "false", + "context_name": "" + ] +} +```