Common parameters

更新时间:
复制 MD 格式

This topic describes the request and response parameters required for every API call.

Common request parameters

Table 1. Common request parameters
NameTypeRequiredDescription
FormatStringNoThe format of the response message. Valid values:

JSON (default) | XML

VersionStringYesThe API version. The format is YYYY-MM-DD. Valid value:

2018-10-30

AccessKeyIdStringYesThe ID of your AccessKey.
SignatureStringYesThe signature string.
SignatureMethodStringYesThe signature method. Valid value:

HMAC-SHA1

TimestampStringYesThe timestamp of the request. The value must be in the ISO 8601 standard and in UTC. The format is YYYY-MM-DDThh:mm:ssZ.

For example, 20:00:00 on January 10, 2013 (UTC+8) is 2013-01-10T12:00:00Z in UTC.

SignatureVersionStringYesThe signature algorithm version. Valid value:

1.0

SignatureNonceStringYesA unique random number to prevent replay attacks.

Use a different random number for each request.

ResourceOwnerAccountStringNoThe account of the resource owner. This is the logon username.
Example
http://cityvisual.cn-shanghai.aliyuncs.com/?Action=DescribeInstances
&TimeStamp=2019-09-01T10%3A33%3A56Z
&Format=xml
&AccessKeyId=testid
&SignatureMethod=Hmac-SHA1
&SignatureNonce=NwDAxvLU6tFE0DVb
&Version=2018-10-30
&SignatureVersion=1.0
&Signature=Signature

Common response parameters

API responses use a unified format. Successful calls return data in either XML or JSON, which you can specify in the request. The default format is XML. Every API call, regardless of the result, returns a unique RequestId.
  • A 2xx HTTP status code indicates that the call is successful.
  • A 4xx or 5xx HTTP status code indicates that the call failed.
The following examples show a common response in XML and JSON formats.
  • XML format
    <?xml version="1.0" encoding="utf-8"?> 
        <!—Root node of the result-->
        <APIName+Response>
            <!—Request ID tag-->
            <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
            <!—Response data-->
        </APIName+Response>
                            
  • JSON format
    {
        "RequestId":"4C467B38-3910-447D-87BC-AC049166F216",
        /* Response data */
    }