Returned results

Last Updated: Sep 22, 2017

After the API service is called, the returned data is in a unified format.

The returned HTTP status code 2xx indicates that the call is successful.
The returned HTTP status code 4xx or 5xx indicates that the call failed.

The formats of returned data from successful calls are mainly XML and JSON. An external system can pass in parameters during requesting to specify the format of the returned data. XML is the default format.

The formats in the examples in this document are adjusted for viewing convenience. The actual returned results have no line breaks, indentation, or other layouts.

Successful results

XML example

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--Result root node-->
  3. <Interface name + Response>
  4. <!--Return request tag-->
  5. <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
  6. <!--Return result data-->
  7. </Interface name + Response>

JSON example

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

Error results

When an error occurs in an interface call, no result data returns. You can pinpoint the causes of the error based on the error codes corresponding to each interface and the public error codes that are listed in Error codes.

When an error occurs in a call, an HTTP status code of 4xx or 5xx will be returned. The returned message body contains the specific error code and error message. The message body also contains a globally unique RequestId and the requested HostId. If you cannot find the error cause, you can contact Alibaba Cloud customer service and provide the HostId and RequestId to help us solve the problem as quickly as possible.

XML example

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Error>
  3. <RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
  4. <HostId>dm.aliyuncs.com</HostId>
  5. <Code>InvalidTemplate.NotFound</Code>
  6. <Message>The specified template is not found.</Message>
  7. </Error>

JSON example

  1. {
  2. "RequestId": "8906582E-6722-409A-A6C4-0E7863B733A5",
  3. "HostId": "dm.aliyuncs.com",
  4. "Code": "InvalidTemplate.NotFound",
  5. "Message": "The specified template does not found."
  6. }
Thank you! We've received your feedback.