Geolocation API
The /geolocation endpoint returns nodes with their geographic coordinates and computed status (for the geographical map), and the map’s tile-server configuration. It is mounted under /opennms/api/v2/geolocation and produces/consumes application/json and application/xml.
GETs (reading data)
| Resource | Description |
|---|---|
|
Returns the map/tile-server configuration used to render the geographic map: |
POSTs (querying data)
POST consumes application/json and returns the matching nodes.
| Resource | Description |
|---|---|
|
Returns the list of nodes with geographic coordinates and computed status, filtered by the supplied query. Body (
Returns |
Examples using cURL
curl -u admin:admin "http://127.0.0.1:8980/opennms/api/v2/geolocation/config"
curl -u admin:admin -H 'Content-Type: application/json' \
-d '{"strategy":"Alarms","severityFilter":"Minor","includeAcknowledgedAlarms":false}' \
"http://127.0.0.1:8980/opennms/api/v2/geolocation"
[
{
"nodeInfo": {"nodeId":1,"nodeLabel":"router-01"},
"coordinates": {"longitude":-79.06,"latitude":35.72},
"severityInfo": {"id":5,"label":"Major"},
"alarmUnackedCount": 3
}
]