Logs API
The /logs endpoint is read-only, produces application/json, and requires the ADMIN role.
GETs (reading data)
| Resource | Description |
|---|---|
|
Lists the available log file names (files ending in |
|
Returns the contents of a single log file.
Returns |
Examples using cURL
List the available log files
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/logs"
Response
["manager.log","web.log","provisiond.log"]
Fetch the last 100 lines of a log file
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/logs/contents?f=web.log&n=100&reverse=true"