Get CPC Events Log
The Get CPC Events Log operation returns the console events log, filtered according to the query parameters, if specified. This operation is supported using the BCPii interface.
HTTP method and URI
GET /api/cpcs/{cpc-id}/operations/get-events-log
In this request, the URI variable {cpc-id} is the object ID of the target CPC object.
Query Parameters
Name | Type | Rqd/Opt | Description |
---|---|---|---|
begin-time | Timestamp | Optional | A timestamp used to filter log entries. Entries created earlier than this time are omitted from the results. This is specified as the number of milliseconds since the epoch and must be greater than or equal to 0. If not specified, then no such filtering is performed. |
end-time | Timestamp | Optional | A timestamp used to filter log entries. Entries created later than this time are omitted from the results. This is specified as the number of milliseconds since the epoch and must be greater than or equal to 0. If not specified, then no such filtering is performed. |
event-id | String | Optional | A regular expression used to limit returned entries to those that have a matching event ID. This query parameter can be used to limit the data returned to event IDs that are desired. If not specified, then no such filtering is performed. |
max-entries | Integer | Optional | An integer value greater than zero that indicates the maximum number of
entries to be returned. If specified, this query parameter can only be specified once. Use of this
query parameter allows for the data returned to be limited. Using the timestamp of the last entry
returned as the begin-time on a subsequent invocation of this operation can get the next set of
entries. Note: For operations using the BCPii interface this query parameter is required and cannot
be a value greater than 100.
|
Response body contents
On successful completion, the response body is a JSON array of JSON objects. For the web services interface the response is returned using HTTP chunked transfer encoding, while for the BCPii interface it is not. Each array element is a log-entry-info object containing information about a single log entry. The array elements are in order of increasing timestamp. See Table 1 for more information.
Description
This operation returns the Console's events log in increasing timestamp order, filtered according to the query parameters, if specified. Each log entry pertains to a specific event that occurred on or to a managed object or the console itself. The log entries can be limited by specifying explicit filtering criteria on the request. If the begin-time query parameter is specified, then any entries earlier than that time are omitted. If the end-time query parameter is specified, then any entries later than that time are omitted. If the event-id query parameter is specified, then any entries with an event ID that does not match are omitted. If the max-entries query parameter is specified, then the number of returned entries will not exceed this value.
For the web services interface the API user must have action/task permission to the View Console Events task; otherwise, status code 403 (Forbidden) is returned. For the BCPii interface the source partition must have receive BCPii security controls permissions for the CPC object; otherwise, status code 403 (Forbidden) is returned.
On successful execution, the response body contains an array of filtered log entries. If the security log is empty or there are no entries to be returned after filtering, then an empty array is provided. Each log entry contains the event ID, event name and event message. If there are data items included in the event message, they are available separately. The order and meaning of the substitution items for each event ID are documented in the console help system in the HMC Introduction topic Audit, Event, and Security Log Messages.
Authorization requirement
This operation has the following authorization requirements:
- For the web services interface, action/task permission to the View Console Events task.
- For the BCPii interface the source partition must have receive BCPii security controls permissions for the CPC object.
HTTP status and reason codes
On success, HTTP status code 200 (OK) is returned and the response body is provided as described Response body contents.
The following HTTP status codes are returned for the indicated errors, and the response body is a standard error response body providing the reason code indicated and associated error message.
HTTP error status code | Reason code | Description |
---|---|---|
400 (Bad Request) | Various | Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes. |
403 (Forbidden) | 0 | The request used the BCPii interface and the source partition does not have receive BCPii security controls permission for the CPC object. |
1 | The API user does not have the required permission for this operation |
Additional standard status and reason codes can be returned, as described in Invoking API operations.