API responses use the HTTP response format where a 2xx status code indicates a successful call and a 4xx or 5xx status code indicates a failed call.
Note
Note:
- Responses can be returned only in the JSON format.
- If you send a request by using third-party tools, you can specify the response format in the request.
- Sample responses in this topic are formatted with line breaks to be reader-friendly.
Sample success responses
JSON
format {
"RequestId": "0BC51021-1740-4C13-8072-4C1CD1D6B1F2",
"Name": "CreateTest",
"OssBucketName": "yuanchuang",
"OssKeyPrefix": "",
"RoleName": "aliyunactiontraildefaultrole"
}
Sample error responses
If an error occurs when you call an operation, no result data is returned. You can locate the cause of an error based on the corresponding error code and Common error codes.
If an error occurs after a request is sent, the HTTP status code, error code, error message, and unique ID of the request are returned in the response. If you cannot locate the cause of the error based on the error code and error message, provide the ID of the request to an Alibaba Cloud technical support engineer so that the engineer can locate the request log.
JSON
format
{
"RequestId": "0BC51021-1740-4C13-8072-4C1CD1D6B1F2",
"HostId": "actiontrail.cn-hangzhou.aliyuncs.com",
"Code": "TrailAlreadyExistsException",
"Message": "account name(CreateTest) and region(cn-hangzhou) is already exist"
}
Common error codes
Error code | Description | Status code |
---|---|---|
InvalidAction | The error message returned because the Action parameter is invalid. | 400 |
InvalidParameterValue | The error message returned because the value of a parameter is invalid. | 400 |
MissingAction | The error message returned because the Action parameter is missing. | 400 |
MissingParameter | The error message returned because a required parameter is missing. | 400 |
InvalidAccessKeyId.Inactive | The error message returned because the AccessKey ID is disabled. | 403 |
NeedRamAuthorize | The error message returned because the Resource Access Management (RAM) user is not authorized to call the API operation. | 403 |
InternalFailure | The error message returned because an unknown internal error has occurred. | 500 |
InternalServerError | The error message returned because an internal server error has occurred. | 500 |
ActionNotImplemented | The error message returned because the specified operation cannot be performed. | 501 |
ServiceUnavailable | The error message returned because the service is unavailable. | 503 |