GetRequestLog
Retrieves an API call log for troubleshooting. Specify the request ID from the original API response.
Operation description
Supports querying API call logs across RAM users or Alibaba Cloud accounts through RAM authorization or role assumption. For more information about authorization methods, see Cross-account authorization for API error diagnosis.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
openapiexplorer:GetRequestLog |
get |
*All Resource
|
None | None |
Request syntax
GET /getRequestLog HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| logRequestId |
string |
Yes |
The request ID of the original API call. Use an uppercase UUID. |
123E4567-E89B-12D3-A456-426614174000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| logInfo |
object |
The details of the API request log. |
|
| basicInfo |
object |
The basic information of the API request. |
|
| api |
string |
The name of the API for the queried request. |
RunInstances |
| apiDoc |
object |
The API documentation information. |
|
| aliyunSite |
string |
The documentation link for the China site. |
https://api.aliyun.com/document/Ecs/2014-05-26/RunInstances |
| alibabacloudSite |
string |
The documentation link for the international site. |
https://api.alibabacloud.com/document/Ecs/2014-05-26/RunInstances |
| apiVersion |
string |
The API version information. |
2014-05-26 |
| product |
string |
The product code. |
Ecs |
| productName |
object |
The product name information, including the Chinese and English names. |
|
| cnName |
string |
The Chinese name of the product. |
云服务器 ECS |
| enName |
string |
The English name of the product. |
Elastic Compute Service |
| apiStyle |
string |
The API style, which can be ROA or RPC. |
roa |
| logRequestId |
string |
The request ID of the original API call. |
123E4567-E89B-12D3-A456-426614174000 |
| httpStatusCode |
string |
The HTTP status code in the queried log. |
404 |
| errorCode |
string |
The error code in the queried log. This field is empty if the queried request did not return an error. |
IncorrectStatus.TransitRouter |
| errorMessage |
string |
The error message in the queried log. This field is empty if the queried request did not return an error. |
The resource is not in a valid state for the operation. |
| accessDeniedDetail |
object |
Details of an access denied error. This field is returned only if the original request failed a permission check. |
|
| policyType |
string |
The policy type that caused the access denial. |
AccountLevelIdentityBasedPolicy |
| authPrincipalOwnerId |
string |
The UID of the Alibaba Cloud account to which the current identity belongs. |
1001234561234567 |
| authPrincipalType |
string |
The identity type of the operator. |
SubUser |
| authPrincipalDisplayName |
string |
The identifier displayed for the principal. |
205618123456123456 |
| noPermissionType |
string |
The reason for the access denial. |
ImplicitDeny |
| authAction |
string |
The specific action that caused the access denial. |
openapiexplorer:GetRequestLog |
| encodedDiagnosticMessage |
string |
The encoded message for diagnostics. You can call the DecodeDiagnosticMessage API operation of RAM to obtain more diagnostic information. |
- |
| httpMethod |
string |
The HTTP method, such as GET, PUT, or POST. |
GET |
| requestDuration |
string |
The time taken by the gateway from receiving the request to returning the response. Unit: milliseconds. |
188 |
| sdkRequestTime |
string |
The time when the request is initiated. The time is displayed in UTC and follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. |
2025-01-21T07:43:06Z |
| gatewayProcessTime |
string |
The UTC time when the gateway received the request, in ISO 8601 format ( |
2025-01-21T07:43:06Z |
| regionId |
string |
The region ID of the service. |
cn-hangzhou |
| endpoint |
string |
The endpoint of the service in the region. |
ecs.cn-hangzhou.aliyuncs.com |
| throttlingResult |
string |
The throttling check result. Valid values:
Valid values:
|
FC.PASS |
| callerInfo |
object |
The caller information. |
|
| callerType |
string |
The caller type. Valid values:
Valid values:
|
sub |
| callerIp |
string |
The IP address of the caller. |
100.68.xxx.xxx |
| masterAccountId |
string |
The ID of the primary account. |
1973374733454118 |
| callerAccountId |
string |
The account ID of the caller. |
241009849925897811 |
| userAgent |
string |
The user agent information. |
AlibabaCloud API Workbench |
| vpcId |
string |
The source VPC ID. |
vpc-abcd |
| authenticationInfo |
object |
The authentication information. |
|
| signatureVersion |
string |
The signature version. |
unknown |
| signatureMethod |
string |
The signature method. Valid values:
|
HMAC-SHA256 |
| authenticationType |
string |
The authentication type. Valid values:
|
AK |
| ak |
string |
The AccessKey ID used to make the original API call. |
LTAI1234abcd |
| parameters |
array<object> |
The request parameter information. |
|
|
object |
|||
| name |
string |
The request parameter name. |
InstanceType |
| value |
any |
The request parameter value. |
ecs.g6.large |
| required |
boolean |
Specifies whether the request parameter is required. |
false |
| type |
string |
The request parameter type. |
string |
| responses |
object |
The response information for the request. |
|
| responseBody |
string |
The response body of the original API call. |
{"RequestId":"123E4567-E89B-12D3-A456-426614174000","Code":"IncorrectStatus.TransitRouter","Message":"The resource is not in a valid state for the operation."} |
| responseBodyFormat |
string |
The response body type. Valid values: JSON, XML, and HTML. |
JSON |
| requestId |
string |
The ID of this log lookup request. |
9BFC4AC1-6BE4-5405-BDEC-CA288D404812 |
Examples
Success response
JSON format
{
"logInfo": {
"basicInfo": {
"api": "RunInstances",
"apiDoc": {
"aliyunSite": "https://api.aliyun.com/document/Ecs/2014-05-26/RunInstances",
"alibabacloudSite": "https://api.alibabacloud.com/document/Ecs/2014-05-26/RunInstances"
},
"apiVersion": "2014-05-26",
"product": "Ecs",
"productName": {
"cnName": "云服务器 ECS",
"enName": "Elastic Compute Service"
},
"apiStyle": "roa",
"logRequestId": "123E4567-E89B-12D3-A456-426614174000",
"httpStatusCode": "404",
"errorCode": "IncorrectStatus.TransitRouter",
"errorMessage": "The resource is not in a valid state for the operation.",
"accessDeniedDetail": {
"policyType": "AccountLevelIdentityBasedPolicy",
"authPrincipalOwnerId": "1001234561234567",
"authPrincipalType": "SubUser",
"authPrincipalDisplayName": "205618123456123456",
"noPermissionType": "ImplicitDeny",
"authAction": "openapiexplorer:GetRequestLog",
"encodedDiagnosticMessage": "-"
},
"httpMethod": "GET",
"requestDuration": "188",
"sdkRequestTime": "2025-01-21T07:43:06Z",
"gatewayProcessTime": "2025-01-21T07:43:06Z",
"regionId": "cn-hangzhou",
"endpoint": "ecs.cn-hangzhou.aliyuncs.com",
"throttlingResult": "FC.PASS"
},
"callerInfo": {
"callerType": "sub",
"callerIp": "100.68.xxx.xxx",
"masterAccountId": "1973374733454118",
"callerAccountId": "241009849925897811",
"userAgent": "AlibabaCloud API Workbench",
"vpcId": "vpc-abcd"
},
"authenticationInfo": {
"signatureVersion": "unknown",
"signatureMethod": "HMAC-SHA256",
"authenticationType": "AK",
"ak": "LTAI1234abcd"
},
"parameters": [
{
"name": "InstanceType",
"value": "ecs.g6.large\n",
"required": false,
"type": "string"
}
],
"responses": {
"responseBody": "{\"RequestId\":\"123E4567-E89B-12D3-A456-426614174000\",\"Code\":\"IncorrectStatus.TransitRouter\",\"Message\":\"The resource is not in a valid state for the operation.\"}",
"responseBodyFormat": "JSON"
}
},
"requestId": "9BFC4AC1-6BE4-5405-BDEC-CA288D404812"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam.LogRequestId | Please ensure that the request ID you provided originates from a request you made to a certain OpenAPI. | The parameter logRequestId is invalid. Make sure that the request ID you provide originates from a request you made to a OpenAPI. |
| 404 | NotFound.RequestLog | The log related to this logRequestId does not exist, has expired, or you do not have permission to view it. | The log associated with this logRequestId does not exist, has expired, or you do not have permission to view it. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.