Use a GET request to retrieve log style resources. Log style resource can include a collection of entries relating to open problems or events recorded in an Oracle ILOM log file.
Request Format
GET <Resource_Path>[?start=x&count=y] HTTP/1.1 <Header Name> : <Header Value>
Where:
options for <Resource_Path> would be:
/SP/logs/event/list
/SP/logs/audit/list
/System/log/list
/System/open_problems
start=x&count=y reflect the optional HTTP query parameters to indicate the number of log entries to be returned. For example, if there are 96 entries in the collection, to retrieve the 10 most recent entries (entry 87 to entry 96), the 'start' value would be 97 (even though such an entry does not exist) and the 'count' value would be 10).
Request Header Fields Required
The required request header fields are as follows: Authorization, Accept, and Host.
For a description of these required header fields, see Common Request Header Fields.
Response Status Codes
Success: HTTP Status = 200 OK
Failure: HTTP Status = 4xx, 5xx
Response Body (Success Status)
The general JSON response body for a GET request of log-style resources would look like:
{ "collection name": [ { "property1 name": "property1 value", ... "propertyn name": "propertyn value" }, ... { "property1 name": "property1 value", ... "propertyn name": "propertyn value" } ] }
Example: HTTP Request
In the following HTTP example, a request is sent to the server SP to retrieve a list of audit log entries.
GET /rest/v1/SP/logs/audit/list/?start=267&count=3 HTTP/1.1 Accept: application/json
The Oracle ILOM REST API returns a list of audit log entries in a JSON response body format, for example:
{ "Target": "/rest/v1/SP/logs/audit/list", "Log": [ { "id": "266", "datetime": "Wed Jan 9 20:43:47 2019", "class": "Audit", "type": "UI", "severity": "minor", "description": "root : Set : object = \"/SP/config/dump_uri\" : value = \"Browser download\" : success" }, { "id": "265", "datetime": "Wed Jan 9 20:40:12 2019", "class": "Audit", "type": "UI", "severity": "minor", "description": "root : Set : object = \"/System/BIOS/Config/dump_uri\" : value = \"Browser download\" : success" }, { "id": "264", "datetime": "Wed Jan 9 20:37:08 2019", "class": "Audit", "type": "UI", "severity": "minor", "description": "root : Open Session : object = \"/SP/sessions/27/type\" : value = \"rest\" : success" } ] }