From 38d386700282d87fffeec9cbcb7add0eaadae1f1 Mon Sep 17 00:00:00 2001 From: Magnus S Date: Wed, 23 Mar 2016 11:51:55 +0100 Subject: Update API.rst Moved public on top, since that is what I assume you want 3rd parties to use. Added the public URL as well. --- web/nms.gathering.org/api/API.rst | 70 ++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 34 deletions(-) (limited to 'web/nms.gathering.org/api/API.rst') diff --git a/web/nms.gathering.org/api/API.rst b/web/nms.gathering.org/api/API.rst index 61fbb5a..8fcb657 100644 --- a/web/nms.gathering.org/api/API.rst +++ b/web/nms.gathering.org/api/API.rst @@ -19,6 +19,42 @@ Currently error handling sucks. This document is in no way complete, but it's a start. It will be updated as time permits and API's stabilize. +Public +...... + +Use URL https://nms-public.tg16.gathering.org + +/api/public/ping +---------------- + +Methods: GET +Update frequency: every second or so. + +Used to report linknet latency. + +The switch latency is being integrated into switch-state.pl and linknet +latency will similarly be moved. + +/api/public/switches +-------------------- + +Methods: GET +Update frequency: Infrequent (on topology/config changes) + +List all switches and map positions. + +Used to draw switches on a map and provide static information. + +/api/public/switch-state +------------------------ + +Methods: GET +Update frequency: Every second + +Provides state for each switch, including total port speed, uplink port +speed, latency and temperature. + + Private ....... @@ -77,37 +113,3 @@ Accepts an array of switches. Magic: If you set placement to be "reset", it will re-calculate placement based on sysname. For new switches, this is redundant as an empty placement-field will trigger the same behavior. - - -Public -...... - -/api/public/ping ----------------- - -Methods: GET -Update frequency: every second or so. - -Used to report linknet latency. - -The switch latency is being integrated into switch-state.pl and linknet -latency will similarly be moved. - -/api/public/switches --------------------- - -Methods: GET -Update frequency: Infrequent (on topology/config changes) - -List all switches and map positions. - -Used to draw switches on a map and provide static information. - -/api/public/switch-state ------------------------- - -Methods: GET -Update frequency: Every second - -Provides state for each switch, including total port speed, uplink port -speed, latency and temperature. -- cgit v1.2.3 From c96b6ff54b3d1df27b31803262688ca6b35ab003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Kir=C3=B8?= Date: Wed, 23 Mar 2016 12:44:26 +0100 Subject: Public api doc updated. Still work in progress. --- web/nms.gathering.org/api/API.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'web/nms.gathering.org/api/API.rst') diff --git a/web/nms.gathering.org/api/API.rst b/web/nms.gathering.org/api/API.rst index 8fcb657..7d5c88b 100644 --- a/web/nms.gathering.org/api/API.rst +++ b/web/nms.gathering.org/api/API.rst @@ -22,7 +22,23 @@ as time permits and API's stabilize. Public ...... -Use URL https://nms-public.tg16.gathering.org +Use URL https://nms-public.tg16.gathering.org/api/public + +/api/public/dhcp +---------------- + +Methods: GET +Update frequency: every second or so. + +Used to report time since last dhcp lease. + +/api/public/dhcp-summary +------------------------ + +Methods: GET +Update frequency: every second or so. + +Used to report dhcp lease stats. Both recent stats, and total stats. /api/public/ping ---------------- -- cgit v1.2.3