• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Common Message Headers
  5. Common Request Headers

Common Request Headers

Table 1 Common request headers

Parameter

Description

Mandatory

Example Value

x-sdk-date

Specifies the time when the request is sent. The time is in YYYYMMDD'T'HHMMSS'Z' format.

The value is the current GMT time of the system.

No

This field is mandatory for AK/SK authentication.

20150907T101459Z

Authorization

Specifies the authentication information.

The value can be obtained from the request signing result.

For details, see Request Signing Procedure.

No

This field is mandatory for AK/SK authentication.

SDK-HMAC-SHA256 Credential=ZIRRKMTWPTQFQI1WKNKB/20150907//ec2/sdk_request, SignedHeaders=content-type;host;x-sdk-date, Signature=55741b610f3c9fa3ae40b5a8021ebf7ebc2a28a603fc62d25cb3bfe6608e1994

Host

Specifies the server domain name and port number of the resources being requested. The value can be obtained from the URL of the service API. The value is Hostname:Port number format. If the port number is not specified, the default port is used. The default port number for https is 443.

No

This field is mandatory for AK/SK authentication.

code.test.com

or

code.test.com:443

Content-Type

Specifies the request body MIME type. You are advised to use the default value application/json. For APIs used to upload objects or images, the value can vary depending on the flow type.

Yes

application/json

Content-Length

Specifies the length of the request body. The unit is byte.

No

3495

X-Project-Id

Specifies the project ID. Obtain the project ID by following the instructions in Obtaining a Project ID.

No

e9993fc787d94b6c886cbaa340f9c0f4

X-Auth-Token

Specifies the user token.

For details about how to obtain the token, see "Obtaining the User Token" in the Identity and Access Management API Reference. After the request is processed, the value of X-Subject-Token in the header is the token value.

No

This field is mandatory for token authentication.

The following is part of an example token: MIIPAgYJKoZIhvcNAQcCoIIO8zCCDu8CAQExDTALBglghkgBZQMEAgEwgg1QBgkqhkiG9w0BBwGggg1BBIINPXsidG9rZ.

NOTE:

For details about other parameters in the header, see the HTTP protocol documentation.