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.

Note The response examples in this topic are formatted with line breaks or indents for a clear view. Actual response data is not formatted in the same manner as these examples.

Sample success response

The responses in XML format include information about whether the call was successful, and details specific to the operation. Example:
<? xml version="1.0" encoding="utf-8"? > 
<!--The root node of the response-->
<API operation name + Response>
<!--The returned request tag-->
<!--The returned result-->
</API operation name + Response>
JSON format:
"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"? >
<Message>The specified action is not supported. </Message>
JSON format:

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