API responses use the HTTP response format where a 2xx status code indicates a successful call and a 4xx or 5xx status code indicates a failed call. Responses can be returned in either the JSON or XML format. You can specify the response format in the request. The default response format is XML.

Note Sample responses in the Alibaba Cloud DNS API document are formatted for ease of reading. Actual responses are not formatted with line breaks or indentation.

Sample success responses

  • XML format
    <? xml version="1.0" encoding="UTF-8"? > 
    <!--Result root node-->
    <API name+Response>
        <!--Returned request tag-->
        <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
        <!--Response result data-->
    </API name+Response>
  • JSON format
    {
        "RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
        /* Response result data */
    }

Sample error responses

If an error occurs during an operation call, no response result data is returned. You can locate the cause of the error by using the corresponding error code and common error codes.

If an error occurs during an HTTP request, the system returns an HTTP status code of 4xx or 5xx. The response body contains the error code, the error message, a globally unique request ID (RequestId), and the ID of the site you accessed with this request (HostId). If you cannot locate the cause of the error, contact Alibaba Cloud customer service and provide them with HostId and RequestId to help solve the problem.

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