Every time you send a request to call an API, the system returns the result to you, no matter whether the call is successful or not. This topic describes the details of related results returned.

DMS OpenAPI uses the standard HTTP status code to represent the request processing result. The specific HTTP status code is as follows:
  • If the returned HTTP status code is 2xx, the call was successful.
  • If the returned HTTP status code is 4xx or 5xx, the call failed.
Responses can be returned in either the JSON or XML format. The default response format is XML. You can specify the response data format upon a request from an external system. Sample responses in the Alibaba Cloud DNS API document are formatted to facilitate reading. The actual responses are not formatted with line breaks or indentation.

Sample success responses

Example:

  • XML format
    <RegisterUserResponse>
      <RequestId>ADE24A7C-DB8B-4D32-94AD-E50E3B******</RequestId>
      <Success>true</Success>
    </RegisterUserResponse>
  • JSON format
    {
        "RequestId":"34E01EDD-6A16-4CF0-9541-C644D1******",
        "Success":true
    }

Sample error responses

If an error occurs during a call, the system returns an HTTP status code of 4xx or 5xx for the HTTP request. The returned message contains the specific error code and error message, the globally unique request ID(RequestId), and the host ID(HostId) of the request.
Note You can identify the cause based on the returned error code. For more information, see error code. If you cannot locate the cause of the error, please use submit a ticket contact customer service after-sales and provide the preceding HostId and RequestId in the ticket for customer service to solve the problem quickly.

Example:

  • XML format
    <Error>
      <RequestId>ADE24A7C-DB8B-4D32-94AD-E50E3B******</RequestId>
      <HostId>xxx-xxxxxxxxxx.aliyuncs.com</HostId>
      <Code>UserExisted</Code>
      <Message>The specified user already exists. </Message>
    </Error>
  • JSON format
    {
        "Code":"UserExisted",
        "HostId":"xxx-xxxxxxxxxx.aliyuncs.com",
        "Message":"The specified user already exists.",
        "RequestId":"34E01EDD-6A16-4CF0-9541-C644D1******"
    }