All Products
Search
Document Center

Response Structure

Last Updated: Aug 21, 2019

Responses

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:

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

JSON example:

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

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:

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

JSON example:

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