All responses include the fields RequestId, Action, Version, Service, Region, and other fields.
After a successful API call, RequestId and response parameters are returned. Such a response is referred to as a normal response. The HTTP status code is 2xx.
{ "ResponseMetadata": { "RequestId": "202010201722300102****", "Action": "{Action}", "Version": "{Version}", "Service": "{Service}", "Region": "{Region}" }, "Result":"..." }
When the request is processed successfully, the response contains two parts: ResponseMetadata and Result. The Result depends on the specific API being called; different APIs return different Result values. The field explanations are as follows:
Field | Description |
|---|---|
RequestId | RequestId is the unique identifier for each API request. |
Action | The name of the API being called. This is a common request parameter. |
Version | The version number of the request. This is a common request parameter. |
Service | The service being requested. This is a common request parameter. |
Region | The region information where the service is located. This is a common request parameter. |
When an API call fails, RequestId and error information are returned. Such a response is referred to as an error response. The HTTP status code is 4xx or 5xx.
You can use the API error code (Code) and error message (Message) to refer to the public error codes and API error codes to troubleshoot errors.
{ "ResponseMetadata": { "RequestId": "202010201722300102****", "Action": "{Action}", "Version": "{Version}", "Service": "{Service}", "Region": "{Region}", "Error": { "Status": null, "Code": "InvalidRequest", "BizCode": "InvalidRequest", "ProviderCode": "EMR" "Message": "Access Denied emr-xxx" } } "Result": null }
Compared to a successful result, the Result part of an error result will be null, and the ResponseMetadata will additionally include an Error field, which contains Code and Message. The field explanations are as follows:
Field | Description |
|---|---|
Error | The presence of Error indicates that the request failed. |
Code | Code contains the specific error code. You can refer to the documentation to resolve the issue yourself based on the error code. |
Message | Message describes the specific reason for the error, which can help you troubleshoot the issue. |
RequestId | RequestId is the unique identifier for each API request. If you encounter an issue that cannot be resolved on your own, you can contact us through the ticket system and provide the RequestId of the request. We will assist with troubleshooting. |