Common parameters

Updated at:

This topic describes the request and response parameters that are common to all API calls.

Common request parameters

Table 1. Common request parameters

Name

Type

Required

Description

Format

String

No

The format of the response message. Valid values:

XML (default) | JSON

Version

String

Yes

The API version in YYYY-MM-DD format. Set this parameter to a fixed value:

2019-11-18

AccessKeyId

String

Yes

The ID of the AccessKey that you use to access the service.

Signature

String

Yes

The signature string.

SignatureMethod

String

Yes

The signature method. Valid value:

HMAC-SHA1

Timestamp

String

Yes

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

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

SignatureVersion

String

Yes

The version of the signature algorithm. Valid value:

1.0

SignatureNonce

String

Yes

A unique random number to prevent replay attacks.

Use a different random number for each request.

ResourceOwnerAccount

String

No

The account of the resource owner that is accessed by this API request. This is the logon username.

Example

https://address-purification.cn-hangzhou.aliyuncs.com/?Action=ClassifyPOI
&Timestamp=2014-05-19T10%3A33%3A56Z
&Format=xml
&AccessKeyId=testid
&SignatureMethod=Hmac-SHA1
&SignatureNonce=NwDAxvLU6tFE0DVb
&Version=2019-11-18
&SignatureVersion=1.0
&Signature=Signature

Common response parameters

API responses use a unified format. You can specify the response format as XML or JSON in your request. The default format is XML. A unique RequestId is returned for every API call, regardless of whether the call is successful.

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

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

Examples of common response parameters:

  • XML format

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

    {
        "RequestId":"4C467B38-3910-447D-87BC-AC049166F216",
        /*Response data*/
        }