Responses can be returned in the JSON or XML format. The default response format is XML. To change the format, you can specify the common parameter Format in requests. To improve readability, the sample responses in this topic are formatted. The actual responses are not formatted with line breaks or indentation.

Sample success responses

If a request is successful, the request ID is returned. The HTTP status code is 2xx.

  • XML format
    <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId> <!--Request ID-->
  • JSON format
    {
        "RequestId": "4C467B38-3910-447D-87BC-AC049166F216" /* Request ID */
    }

Sample error responses

If an error occurs when you call an operation, an error response that consists of the error code, error message, and request ID is returned. The HTTP status code is 4xx or 5xx.

You can troubleshoot issues based on Common errors and operation-specific error codes.

  • XML format
    <?xml version="1.0" encoding="UTF-8"?><!--Root node of the response -->
    <Error>
        <RequestId>540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx</RequestId> <!--Request ID-->
        <HostId>emr.aliyuncs.com</HostId> <!--Endpoint-->
        <Code>MissingParameter.CommandId</Code> <!--Error code-->
        <Message>The input parameter "CommandId" that is mandatory for processing this request is not supplied.</Message> <!-- Error message-->
    </Error>
  • JSON format
    {
        "RequestId": "540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx", /* Request ID */
        "HostId": "emr.aliyuncs.com", /* Endpoint */
        "Code": "MissingParameter.CommandId", /* Error code */
        "Message": "The input parameter "CommandId" that is mandatory for processing this request is not supplied." /* Error message */
    }

Common errors

For a list of common error codes, visit API Error Center.