Device Config REST API

Use the Device Config REST API to fetch existing configurations and trigger retrieval of the device configs.

If not otherwise specified, the Content-Type of the request and response is application/json.
Device Config API functions
Resource Method Description

/device-config

GET

Retrieves all the configurations, sorted by lastUpdated. This API also supports the following query parameters: limit, offset, orderBy, order, deviceName, ipAddress, ipInterfaceId, configType, status, createdAfter, and createdBefore.

/device-config/{id}

GET

Retrieves the configuration for the specific ID (database ID).

/device-config/interface/{id}

GET

Retrieves all the configurations for the specific interface.

/device-config/latest

GET

Retrieves the latest configuration for all devices. This API supports the following query parameters: limit, offset, orderBy, order, search, status, and pageEnter.

/device-config/download?id=\{id1, id2}

GET

Download the configurations with the given ID or IDs.

/device-config/backup

POST

Trigger backup for a given interface and location.

/device-config?id=\{id1, id2}

DELETE

Delete multiple device configurations given a comma-separated list of database IDs.

/device-config/{id}

DELETE

Delete the single device configuration with the given ID (database ID).

Examples:

Trigger device configuration backup
curl -u admin:admin -d '[{"ipAddress":"192.168.1.123","location":"Default","serviceName":"DeviceConfig-default", "blocking": false}]' -H "Content-Type: application/json" -X POST http://localhost:8980/opennms/rest/device-config/backup -v