All Products
Document Center

Returned results

Last Updated: Jan 29, 2018

After the API service is called, data is returned in a unified format. The returned HTTP status code 2xx indicates a successful call, and the status code 4xx or 5xx indicates a failed call. For a successful call, the returned data is in XML or JSON format. An external system can set the format of returned data by setting an input parameter in the request. The default format is XML.

This document lists the examples of returned results in easy-to-view formats. The actual returned results have no line breaks, indentation, or other layouts.

Successful results

  • XML format
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!—Result root node-->
  3. <API name+Response>
  4. <!—Returned request tag-->
  5. <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
  6. <!—Returned results-->
  7. </API name+Response>
  • JSON format
  1. {
  2. "RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
  3. /* Returned results*/
  4. }

Error 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 interface and the public error codes.

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 RequestId and the requested HostId. If the cause of error cannot be identified at the caller, contact Alibaba Cloud customer service and provide the HostId and RequestId to help us to solve the problem as soon as possible.

  • XML format
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Error>
  3. <RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
  4. <HostId></HostId>
  5. <Code>DomainNotExist</Code>
  6. <Message>The domain name does not exist.</Message>
  7. </Error>
  • JSON format
  1. {
  2. "RequestId": "8906582E-6722-409A-A6C4-0E7863B733A5",
  3. "HostId": "",
  4. "Code": "DomainNotExist",
  5. "Message": "The domain name does not exist."
  6. }