After STS API operations are called, data is returned in a unified format. The returned data is in either the XML or JSON format, and the XML format is the default option. Sample responses in API documents are formatted in a way that is easier for you to read. The actual responses are not formatted with line breaks or indentation.

Sample success responses

A 2xx status code indicates that the API operation is successful.

  • XML format
    <?xml version="1.0" encoding="utf-8"?>
    <!--Result Root Node-->
    <Interface Name+Response>
        <!--Return Request Tag-->
        <!--Return Result Data-->
    </Interface Name+Response>
  • JSON format
        "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
        /*Return Result Data*/

Sample error responses

A 4xx or 5xx status code indicates that the API operation fails and no result data is returned. The returned message body contains the specific error code, error message, the RequestId parameter, and the HostId parameter. The RequestId parameter indicates the globally unique ID of the API request. The HostId parameter indicates the ID of the host to which the API request is sent. You can use error codes to locate the errors.

  • XML format
    <?xml version="1.0" encoding="UTF-8"?>
       <Message>The specified parameter "Action or Version" is not valid.</Message>
  • JSON format
        "RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
        "HostId": "",
        "Code": "InvalidParameter",
        "Message": "The specified parameter \"Action or Version\" is not valid."