Geocoding API
The /geocoding endpoint manages the geocoder configuration used to resolve node addresses to geographic coordinates. It is mounted under /opennms/api/v2/geocoding, uses application/json, and requires ROLE_REST or ROLE_ADMIN.
GETs (reading data)
| Resource | Description |
|---|---|
|
Returns the active geocoder manager configuration: |
|
Lists all registered geocoder services with their per-provider configuration. Returns |
POSTs (modifying data)
POST consumes application/json.
| Resource | Description |
|---|---|
|
Updates the manager configuration (selects the active geocoder). Returns Body (
|
|
Updates the configuration of one specific geocoder provider. Returns Body: a JSON object with a provider-specific |
DELETEs (Removing Data)
| Resource | Description |
|---|---|
|
Resets the geocoder manager configuration to defaults. Returns |
Examples using cURL
curl -u admin:admin "http://127.0.0.1:8980/opennms/api/v2/geocoding/config"
{"activeGeocoderId":"nominatim"}
curl -u admin:admin -H 'Content-Type: application/json' \
-d '{"activeGeocoderId":"google"}' \
"http://127.0.0.1:8980/opennms/api/v2/geocoding/config"
curl -u admin:admin -H 'Content-Type: application/json' \
-d '{"config":{"apiKey":"AIza...","useSystemProxy":"true"}}' \
"http://127.0.0.1:8980/opennms/api/v2/geocoding/geocoders/google"