The response data for called operations is returned in the Extensible Markup Language (XML) or JavaScript Object Notation (JSON) format. You can specify the format of the returned data when sending a request. By default, the returned data uses the XML format. 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.

Note To improve user experience, the sample responses in this topic are formatted. However, the actual responses are not formatted with line breaks or indentation.

Sample success responses

The responses in the XML format include the result of the request and the details of the operation. Example:
<? xml version="1.0" encoding="utf-8"? > 
<! --The root node of the result-->
<API operation name + Response>
<! --The returned request tag-->
<RequestId>4C4fdsf38-3910-447D-87AD-AC078932216</RequestId>
<! --The returned result-->
</API operation name + Response>
JSON format:
{
"RequestId": "4C4fdsf38-3910-447D-87AD-AC078932216",
/*The returned result*/
}

Sample error responses

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, an HTTP status code 4xx or 5xx is returned. The response body contains the error code, the error message, a globally unique request ID (RequestId), and the ID of the site you accessed with this request (HostId). If you are unable to find the error cause, you can contact Alibaba Cloud customer service and provide the values of HostId and RequestId to fix the issue.


<? 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>
            
JSON format:

{
"RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
"HostId": " r-kvstore.aliyuncs.com",
"Code": "UnsupportedOperation",
"Message": "The specified action is not supported."
}