edit-icon download-icon

Return result

Last Updated: Feb 14, 2018

After an API is called, data is returned 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 fails. For a successful call, the primary formats of returned data are XML and JSON. When a request is sent, an external system can input parameters to specify the format of the returned data. The default format is XML. In this document, examples of returned results are formatted 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. <API name + Response>
  4. <!-Return request tag-->
  5. <RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
  6. <!-Returned results-->
  7. </API name+Response>

JSON example

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

Failure results

If an error is reported in an API call, no result data is returned. The caller can locate the cause of an error based on the error code corresponding to each API and Error code list. When an error occurs in a call, an HTTP status code 4xx or 5xx is returned for the HTTP request. The returned message body contains the specific error code and error message. The message body also contains the globally unique request ID (RequestId) and the requested host ID (HostId). If unable to locate the error cause, the caller can provide Alibaba Cloud customer service with the HostId and RequestId, and we will help solve the problem as soon as possible.

XML example

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Error>
  3. <RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
  4. <HostId>mts.cn-hangzhou.aliyuncs.com</HostId>
  5. <Code>UnsupportedOperation</Code>
  6. <Message>The specified action is not supported.</Message>
  7. </Error>

JSON example

  1. {
  2. "RequestId": "8906582E-6722-409A-A6C4-0E7863B733A5",
  3. "HostId": "mts.cn-hangzhou.aliyuncs.com",
  4. "Code": "UnsupportedOperation",
  5. "Message": "The specified action is not supported."
  6. }
Thank you! We've received your feedback.