All responses include fields such as RequestId, Action, Version, Service, Region, and other fields.
After a successful API call, the response will include RequestId and the response parameters. 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":"..." }
After the request is processed successfully, the response will contain two parts: ResponseMetadata and Result. The Result part depends on the specific API; different APIs will return different Result structures. 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 API being called. 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. |
If an error occurs during the API call, the response will include RequestId and error information. Such a response is referred to as an error response. The HTTP status code is 4xx or 5xx.
You can use the error code (Code) and error message (Message) to troubleshoot issues by referring to the public error codes and API-specific error codes.
{ "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 response will be null, and the ResponseMetadata will include an additional Error field, which contains Code and Message. Field explanations are as follows:
Field | Description |
|---|---|
Error | The presence of Error indicates that the request has failed. |
Code | The Code field contains the specific error code. You can refer to the documentation to resolve the issue based on the error code. |
Message | The Message field 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 independently, you can contact us through the ticket system and provide the RequestId of the request. We will assist you in troubleshooting the issue. |