All Products
Search
Document Center

:Response Structure

Last Updated:Mar 02, 2022

In the responses, the HTTP status code 2xx indicates a successful call, and the HTTP status code 4xx or 5xx indicates a failed call. The response data for a successful call can be in two formats: XML and JSON. You can specify the data format in the request from an external system. Default value: XML. Sample responses in the following sections have been formatted for clear expression. However, the actual responses are not processed in formats, for example, line breaking and indentation.

Successful response examples

XML example

The XML response includes the parameter that indicates whether the call is successful and displays corresponding service data. Example:

<? xml version="1.0" encoding="UTF-8"? > 
<!-Response root-->
<Operation name+Response>
    <!-Response data-->
    <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
</Operation name+Response>

JSON example:

{
    /* Response data */
"RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
}

Error response examples

If an error occurs when you call an operation, no response data is returned. You can locate the cause of the error using the attached .

If an error occurs, HTTP status code 4xx or 5xx is returned. The returned message body includes the specific error code and message. The response also contains a globally unique request ID (RequestId) and the ID of the site you accessed in this request (HostId). If you cannot locate the cause of the error, submit a ticket and provide the HostId and RequestId included in the response.

XML example:

<? xml version='1.0' encoding='UTF-8'? >
<Error>
  <RequestId>9823FD72-9A5D-4D3F-BA2C-F8238696A81C</RequestId>
  <HostId>business.ap-southeast-1.aliyuncs.com</HostId>
  <Code>InvalidAction.NotFound</Code>
  <Message>Specified api is not found, please check your url and method. </Message>
</Error>

JSON example:

{
  "RequestId":"33D9749B-713A-4BCC-B3B4-8B0094083E97",
  "HostId":"business.aliyuncs.com",
  "Code":"InvalidAction.NotFound",
  "Message":"Specified api is not found, please check your url and method."
}