All Products
Search
Document Center

HTTPDNS:Sample responses

Last Updated:Sep 19, 2022

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.

The sample responses provided in this topic have been formatted with line breaks and indentations for better readability. The actual responses are not properly formatted as these examples.

Sample success responses

XML format

<?xml version="1.0" encoding="UTF-8"?>
<!-Result Root Node-->
<Interface Name+Response>
    <!-Return Request Tag-->
    <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
    <!-Return Result Data-->
</Interface Name+Response>

JSON format

{
    "RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
    /* Return Result Data */
}

Sample error responses

If an error occurs when you call an API operation, no result data is returned. You can troubleshoot an error based on error codes specific to an API operation and error codes in Error codes.

For an error that occurs when you call an API operation, a 4xx or 5xx HTTP status code is returned. The returned response body contains the specific error code and error message. The response body also contains the RequestId parameter that indicates the globally unique ID of the request and the HostId parameter that indicates the ID of the service that you requested to access. If you cannot locate the cause of the error, contact Alibaba Cloud customer service and provide them with HostId and RequestId to help resolve the issue.

XML format

<?xml version="1.0" encoding="UTF-8"?>
<Error>
   <RequestId>8906582E-6722-409A-A6C4-0E7863B733A5</RequestId>
   <HostId>httpdns-api.aliyuncs.com</HostId>
   <Code>DomainNotFound</Code>
   <Message>The domain is not found in this user's domain list.</Message>
</Error>

JSON format

{
    "RequestId": "8906582E-6722-409A-A6C4-0E7863B733A5",
    "HostId": "httpdns-api.aliyuncs.com",
    "Code": "DomainNotFound",
    "Message": "The domain is not found in this user's domain list."
}