Every time you send a request to call an operation, the system returns a response, no matter whether the call is successful or not. This article will introduce the details of the related returned results.

DMS OpenAPI uses the standard HTTP status code to indicate the request processing result. The HTTP status code is shown below:
  • If the returned HTTP status code is 2xx, the call is 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 when sending a request. For the sake of readability, lines in all sample responses are wrapped and indented in the API reference. Note that lines are not formatted in actual responses.

Sample success responses

Examples

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

Error codes

If an error occurs during a call, an HTTP status code of 4xx or 5xx is returned. The returned message contains the specific error code and error information, the globally unique request ID(RequestId), and the requested site ID(HostId).
Note You can troubleshoot the error based on the returned error codes. For more information, see error codes. If you cannot locate the cause of the error, you can contact after-sales service by opening a ticket and provide HostId and RequestId in the ticket for customer service to resolve the issue quickly.

Examples

  • 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******" }