Common parameters

更新时间:
复制 MD 格式

This topic describes the parameters that are common to all API requests and responses.

Common request parameters

Name

Type

Required

Description

Format

String

No

The format of the response. Valid values:

  • JSON (default)

  • XML

Version

String

Yes

The version of the API. The value must be in the YYYY-MM-DD format. Set the value to 2016-01-20.

AccessKeyId

String

Yes

The ID of your AccessKey.

Signature

String

Yes

The signature string of the current request.

SignatureMethod

String

Yes

The signature method. Set the value to HMAC-SHA1.

Timestamp

String

Yes

The timestamp of the request. The time must be in UTC and in the YYYY-MM-DDThh:mm:ssZ format as specified by ISO 8601.

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

SignatureVersion

String

Yes

The version of the signature algorithm. Set the value to 1.0.

The following is an example of common request parameters:

https://kms.cn-hangzhou.aliyuncs.com/?Action=CreateKey
&Format=json
&Version=2016-01-20
&AccessKeyId=te****
&Signature=YlrFhyqDZQ1ThNYARrv3Ptaxqf****
&SignatureMethod=HMAC-SHA1
&Timestamp=2022-01-10T12:00:00Z
&SignatureVersion=1.0          

Common response parameters

Responses are returned in a standard format, either XML or JSON. You can specify the format in your request. The default format is JSON. Each API call returns a unique RequestId, regardless of whether the call is successful.

  • An HTTP 2xx status code indicates a successful call.

  • An HTTP 4xx or 5xx status code indicates a failed call.

The following are common response parameters:

  • XML format

    <?xml version="1.0" encoding="utf-8"?> 
        <!--The root node of the result-->
        <KMS>
            <!--The request ID tag-->
            <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
            <!--The returned result data-->
        </KMS>                        
  • JSON format

    {
        "RequestId":"4C467B38-3910-447D-87BC-AC049166F216"
        /*The returned result data*/
    }