Config Management
Use the Config Management REST API to manage Meridian configurations. Changes take effect immediately.
GETs (reading data)
Resource | Description |
---|---|
/cm/{configName} |
Returns a list of |
/cm/schema/{configName} |
Returns OpenAPI schema (for Swagger UI) in JSON/YAML format. |
/cm/{configName}/{configId} |
Returns configuration in JSON/YAML format. |
/cm/{configName}/{configId}/{path} |
Returns a part of the configuration specified by |
POSTs (adding data)
Resource | Description |
---|---|
/cm/{configName}/{configId} |
Add new configuration.
If the same configuration exists, it will return an error. |
/cm/{configName}/{configId}/{path} |
Adds an array element to the configuration part specified by |
PUTs (modifying data)
Resource | Description |
---|---|
/cm/{configName}/{configId} |
Update configuration.
If configuration does not exist, it will return error. |
/cm/{configName}/{configId}/{path} |
Updates a part of the configuration specified by |
/cm/{configName}/{configId}/{pathToParent}/{nodeName} |
Updates or inserts a part of the configuration specified by |
Examples
The following example payload multiplies each thread pool size by a factor of 10 and empties the external requisitions list of entries (if any exist):
{
"rescanThreads": 100,
"requistion-dir": "/opt/opennms/etc/imports",
"importThreads": 80,
"scanThreads": 100,
"writeThreads": 80,
"foreign-source-dir": "/opt/opennms/etc/foreign-sources",
"requisition-def": []
}
Do not change the requisition-dir and foreign-source-dir elements unless OpenNMS support tells you to do so.
|
You can also target a single element using a cURL command:
curl -X PUT -u 'admin:admin' https://opennms.example.com/opennms/rest/cm/provisiond/default -H 'Content-type: application/json' --data '{ "rescanThreads": 150 }'
DELETEs (removing data)
Resource | Description |
---|---|
/cm/{configName}/{configId} |
Delete configuration. |
/cm/{configName}/{configId}/{path} |
Deletes a part of the configuration specified by |