Go to main content

Oracle® ILOM Web Service REST API

Exit Print View

Updated: December 2019
 
 

Retrieve Log-Style Resources Using GET Requests

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.


Note -  Oracle ILOM logs include: Audit Log, Event Log, or System Log. Open problem entries relate to problems currently open on the system. The collection and properties available for each log style resource are described in the Swagger model. For more details about the Swagger model, see Discovering Management Resources.

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


        Note -  The resource path for /System/Open_Problems does not have a /list at the end.
    • 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).


      Note -  The Open Problems log does not support the use of the start and count (?start=x&count=y) query parameters.

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)


Note -  To identify the exact response body media type, refer to the Oracle ILOM Swagger Model (swagger.json) description. For more details, see Discovering Management Resources.

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"
    }
  ]
}