All Products
Search
Document Center

Drive and Photo Service:Common parameters

Last Updated:Aug 23, 2024

When you call API operations of Photo and Drive Service (PDS), you need to specify multiple request parameters. After you call an API operation, response parameters are returned. This topic describes the common request parameters and common response parameters of PDS API.

Common request parameters

Common request parameters must be included in all Photo and Drive Service (PDS) API requests. Common request parameters vary with the authentication method.

Common request parameter if an Alibaba Cloud AccessKey pair is used for signature authentication

Parameter

Type

Required

Description

Authorization

String

Yes

The authentication information that is used to validate the request. Specify the value in the acs AccessKeyId:signature format.

Content-Length

long

Yes

The length of the HTTP request body defined in RFC 2616.

Content-Type

String

Yes

The type of the HTTP request body defined in RFC 2616.

Content-MD5

String

Yes

The Base64-encoded 128-bit MD5 hash value of the HTTP request body. We recommend that you specify this parameter for all requests to prevent parameter tampering.

Date

String

Yes

The timestamp of the request. Specify the value in the GMT format. Example: Wed, 26 Aug. 2015 17:01:00 GMT.

Accept

String

Yes

The type of the response that is required by the client. Set the value to application/json.

Host

String

Yes

The endpoint of the PDS API.

x-acs-signature-nonce

String

Yes

A unique random number that is used to prevent replay attacks. You must use different numbers for different requests.

x-acs-signature-method

String

Yes

The encryption method of the signature string. Set the value to HMAC-SHA1.

x-acs-signature-version

String

Yes

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

Common request parameters if an access token is used for authentication

Parameter

Type

Required

Description

Host

String

Yes

The endpoint of the PDS API.

Authorization

String

Yes

The authentication information that is used to validate the request. Specify the value in the Bearer {AccessToken} format. Replace {AccessToken} with your actual access token.

Common response parameters

Every response returns a unique request ID regardless of whether the call is successful.

Sample response:

{
    "RequestId": "5B467B38-5110-337D-99BA-33149166F546",
    /* The returned data */
}