Returned results

Last Updated: Dec 08, 2017

After the API service is called, the returned data adopts a uniform format:

  • A returned HTTP status code of 2xx indicates that the call was successful.
  • A returned HTTP status code of 4xx or 5xx indicates that the call was unsuccessful.

For successful calls, the supported formats of returned data are XML and JSON. When a request is sent, an external system can pass in parameters to specify the format of returned data. XML is the default format.

Note: In this document, examples of results returned are formatted in a way that is easier for users to view. The actual results returned are not formatted with line breaks, indentation, and so on.

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

After an error is encountered in an interface call, no result data will be returned. The caller can pinpoint the cause of the error based on the error codes corresponding to each interface and the public error codes.

When an error occurs in a call, the HTTP request will return an HTTP status code of 4xx or 5xx. The returned message body includes the specific error code and error message. It also contains a globally unique request ID (RequestId) and the ID of the site (HostId) you accessed with this request. If you cannot find the cause of the error, contact Alibaba Cloud customer service and provide the HostId and RequestId to help us to 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>dns.aliyuncs.com</HostId>
  5. <Code>DomainNotExist</Code>
  6. <Message>The domain name does not exist.</Message>
  7. </Error>

JSON example:

  1. {
  2. "RequestId": "8906582E-6722-409A-A6C4-0E7863B733A5",
  3. "HostId": "dns.aliyuncs.com",
  4. "Code": "DomainNotExist",
  5. "Message": "The domain name does not exist."
  6. }
Thank you! We've received your feedback.