Operation Log Related Interface
Last Updated:2020-07-20
Query the operation log
- Query information about the operation logs of the Physical Server.
Request Structure
GET /v{version}/operationLog?marker={marker}&maxKeys={maxKeys}&startTime={startTime}&endTime={endTime} HTTP/1.1
Host: bbc.bj.baidubce.com
Authorization: authorization string
Request Header Field
There are no other special header fields except the public header field.
Request Parameter
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number |
marker | String | No | Query parameter | The start position of the query for getting list by batch is a character string generated by the system |
maxKeys | int | No | Query parameter | It is the maximum number contained in each page, which usually does not exceed 1,000. The default value is 100 |
startTime | String | No | Query parameter | Start time (UTC time) to query the BBC operation, format yyyy-MM-dd'T'HH:mm:ss'Z'. If it is empty, query the operation log of current day |
endTime | String | No | Query parameter | Finish time (UTC time) to query the BBC operation, format yyyy-MM-dd'T'HH:mm:ss'Z'. If it is empty, query the operation log of current day |
Return Header Field
There are no other special header fields except the common header field.
Return Parameter
Parameter Name | Type | Description |
---|---|---|
marker | String | Mark the starting position of the query |
isTruncated | boolean | “True” means there is still data behind, and “false” means it is already the last page |
nextMarker | String | Gets the “marker” value to be passed on the next page. This field does not appear when “isTruncated” is “false” |
maxKeys | int | Maximum number of master instances per page |
operationLogs | List<Operation Log Model> | Operation log information, a set of Operation Log Model |
Error Code
Error Code | Error Description | HTTP status code | Explanations |
---|---|---|---|
OperationLog.DateInvalid | startTime is invalid. | 400 | startTime parameter format is error |
OperationLog.DateInvalid | endTime is invalid. | 400 | endTime parameter format is error |
Request Example
GET /v1/operationLog?&marker=1508824812000&maxKeys=1&startTime=2017-10-24T0:46:41Z&endTime=2017-10-25T0:46:41Z HTTP/1.1
Host: bbc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"nextMarker": "1508824812000",
"marker": "1508824812000",
"maxKeys": 1,
"isTruncated": true,
"operationLogs": [
{
"operationStatus": true,
"operationTime": "2017-10-24T06:00:12Z",
"operationDesc": "Shutdown, Physical Server ID: i-PXsIaf7J",
"operationIp": "127.0.0.1"
}
]
}