The response data for called operations is returned in either the Extensible Markup Language (XML) or JavaScript Object Notation (JSON) format. You can specify the format of the returned data when sending a request. The returned data uses the XML format by default. This topic provides the samples of success responses and error responses.
An HTTP status code of 2xx
indicates that the call is successful. An HTTP status code of 4xx
or 5xx
indicates that the call failed.
Sample success response
<? xml version="1.0" encoding="utf-8"? >
<!--The root node of the response-->
<API operation name + Response>
<!--The returned request tag-->
<RequestId>4C4fdsf38-3910-447D-87AD-AC078932216</RequestId>
<!--The returned result-->
</API operation name + Response>
{
"RequestId": "4C4fdsf38-3910-447D-87AD-AC078932216",
/*The returned result*/
}
Sample error response
If an error occurs when you call an API operation, no result is returned. You can
locate the cause of the error by referring to the error codes in the appendix. If
an error occurs when you call an API operation, HTTP status code 4xx
or 5xx
is returned. The response body contains the error code and the error message. The
response body also contains the RequestId and HostId parameters. The RequestId parameter
indicates the globally unique identifier (GUID) of the request, and the HostId parameter
indicates the ID of the site that you accessed with the request. If you are unable
to find the error cause, you can contact Alibaba Cloud customer service and provide
the values of the HostId and RequestId parameters to help resolve the issue as quickly
as possible.
<? xml version="1.0" encoding="UTF-8"? >
<Error>
<RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
<HostId> r-kvstore.aliyuncs.com</HostId>
<Code>UnsupportedOperation</Code>
<Message>The specified action is not supported. </Message>
</Error>
{
"RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
"HostId": " r-kvstore.aliyuncs.com",
"Code": "UnsupportedOperation",
"Message": "The specified action is not supported."
}