Common parameters, which consist of common request parameters and common response parameters, are required by all API operations.

Common request parameters

The following table describes common request parameters required by all API requests.

Parameter Type Required Description
Format String No The format of the response. Valid values: JSON and XML. Default value: JSON.
Version String Yes The API version, in YYYY-MM-DD format. The current version is 2017-08-01.
AccessKeyId String Yes The AccessKey ID provided to you by Alibaba Cloud.
Signature String Yes The calculated signature string. For more information about how to calculate a signature, see Signatures.
SignatureMethod String Yes The signature algorithm. Currently, only HMAC-SHA1 is supported.
Timestamp String Yes The timestamp of the request. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. For example, a value of 2021-03-17T12:00:00Z indicates 20:00:00 on March 17, 2021, UTC+8.
SignatureVersion String Yes The version of the signature algorithm. The current version is 1.0.
SignatureNonce String Yes The unique random number that is used to prevent replay attacks. You must use different random numbers for different requests.

Common response parameters

The system returns a unique ID (RequestId) for each API request, regardless of the request result.

Sample request

Sample response

After you send an API request, the system returns a response in a uniform format. A returned HTTP status code 2xx indicates that the request is successful. A returned HTTP status code 4xx or 5xx indicates that the request fails. The system returns a success response in XML or JSON format. You can specify the format of the response in request parameters. The default format is XML. 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 response
    • XML format
      <? xml version="1.0" encoding="utf-8"? > 
      <!-Result root node-->
          <!-Tag of the response to the request-->
          <!-Result data-->
    • JSON format
          "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
          /* Result data */
  • Sample error response

    If an error occurs during an API operation, the system does not return result data. You can identify the cause of the error according to Client error codes.

    If you send an HTTP request, the system returns an HTTP status code 4xx or 5xx to indicate an error. The returned response body contains the specific error code and error message. It also contains the globally unique request ID (RequestId) and the requested host ID (HostId). If you cannot identify the cause of the error, you can contact the Alibaba Cloud customer service staff and provide the returned HostId and RequestId to help the staff resolve the error.

    • XML format
      <?xml version="1.0" encoding="UTF-8"?>
         <Message>The specified action is not supported.</Message>
    • JSON format
          "RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
          "HostId": "",
          "Code": "UnsupportedOperation",
          "Message": "The specified action is not supported."