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.
Resource Method Description

/device-config

GET

Retrieves all the configurations, sorted by lastUpdated. This API also supports following query params: limit, offset, orderBy order, deviceName, ipAddress, configType, createdAfter, 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 the devices. This API supports the following query parameters: limit, offset, orderBy, order, search, status.

/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.

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