Description
Queries the log information of a specified instance over the last seven days.
Method
GET
URL
/openapi/instances/{instanceId}/logs
Request parameters
Parameter | Type | Required | Description |
queryParams | String | No | The query conditions. Specify this parameter in the format of key1:value1;key2:value. Example: requestId:xxxx;requestUri:xxx. |
startTime | Long | Yes | The start time. The value of this parameter must be accurate to the second. |
endTime | Long | Yes | The end time. The value of this parameter must be accurate to the second. |
page | Integer | No | Default value: 1. |
size | Integer | No | Default value: 10. |
Response parameters
Parameter | Type | Description |
RequestId | String | The ID of the request. This parameter is a common parameter. |
Result | List | The result returned. |
└ErrorCode | String | The error message. The error message IllegalParameter.ReturnCount returned because the maximum number of returned results has been reached. A maximum of 50 results can be returned. The error message QuotaExceeded.QPS returned because the QPS quota has been exceeded. The error message SubAccountNoPermission returned because the RAM user is not authorized to call this operation. The error message InternalServerError returned because an internal error has occurred. |
└RequestUri | String | The uniform resource identifier (URI) of the request. |
└ResponseBody | Map | The request body. |
Header | ||
└X-Total-Count | Integer | The total number of requests. |
Sample requests
GET /openapi/instances/airec-cn-dsksdlisdlfsd/logs?startTime=1234&endTime=3456
Sample responses
{"result": [{"parentId": "26842","bid": "26842","uid": "1992366463629083","ownerId": "1992366463629083","instanceId": "airec-cn-npk1sw34v002","mfa": "false","clientIp": "100.68.178.69","remoteAddr": "false","apiName": "Recommend","requestMethod": "GET","host": "airec.cn-hangzhou.aliyun-inc.com","regionId": "cn-hangzhou","localTime": "21/Sep/2020:15:04:13","requestId": "189ADEE6-1D78-438F-8EA4-32FE96C3900A","requestUri": "/openapi/instances/airec-cn-npk1sw34v002/actions/recommend? ServiceCode=airec&UserId=0&ReturnCount=3","requestBody": "-","requestLength": "1482","bodyByteSize": "1110","responseBody": {"Result": [{"TraceId": "Alibaba","ItemId": "73","ItemType": "recipe","TraceInfo": "1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:0:1:::3:content___73:recipe:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=175,context__hour=15,context__trigger_num=1::::::::","MatchInfo": "hot_common","Weight": 100,"Position": 0},{"TraceId": "Alibaba","ItemId": "76","ItemType": "audio","TraceInfo": "1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:1:1:::3:content___76:audio:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=180,context__hour=15,context__trigger_num=1::::::::","MatchInfo": "hot_common","Weight": 100,"Position": 1},{"TraceId": "Alibaba","ItemId": "79","ItemType": "item","TraceInfo": "1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:2:1:::3:content___79:item:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=102,context__hour=15,context__trigger_num=1::::::::","MatchInfo": "hot_common","Weight": 100,"Position": 2}],"RequestId": "189ADEE6-1D78-438F-8EA4-32FE96C3900A"},"errorCode": "-","status": "200","upstreamTime": "0.219"}],"requestId": "1DD84981-7A61-4C74-AA52-459A22B6FB54","headers": {"X-Total-Count": 1}}