Data Choices API
The /datachoices endpoint manages the usage-statistics ("Data Choices") opt-in and the product-update enrollment. It is mounted under /opennms/rest/datachoices and uses application/json.
GETs (reading data)
| Resource | Description |
|---|---|
|
Returns the generated usage-statistics report for the current system. |
|
Reports whether usage-statistics collection is enabled and whether the initial notice has been acknowledged. |
|
Returns descriptive metadata about the usage-statistics fields. |
|
Reports whether the user has opted in to product-update enrollment and acknowledged its notice. |
POSTs (Creating Data)
POST consumes application/json and returns 202 Accepted.
| Resource | Description |
|---|---|
|
Enables/disables usage-statistics collection and/or marks the initial notice acknowledged. Body (
|
|
Sets the product-update enrollment opt-in and/or notice-acknowledged flags. Body (
|
|
Submits the user’s product-update enrollment form. Returns Body (
|
Examples using cURL
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/datachoices"
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/datachoices/status"
{"enabled":true,"initialNoticeAcknowledged":true}
curl -u admin:admin -H 'Content-Type: application/json' \
-d '{"enabled":true,"initialNoticeAcknowledged":true}' \
"http://127.0.0.1:8980/opennms/rest/datachoices/status"