Common Message Headers
Common Request Headers
| Parameter | Description | Mandatory | Example Value |
|---|---|---|---|
| Content-type | Request body type or format. Its default value is application/json. | Yes | application/json |
| X-Project-Id | Project ID, which is used to obtain the token of a project. For details about how to obtain the project ID, tenant ID, AK, and SK, see Obtaining the Project ID, Account Name, and AK/SK. | No | e9993fc787d94b6c886cbaa340f9c0f4 |
| X-Auth-Token | User token, a response to the API used to obtain a user token. This API is the only one that does not require authentication. | This parameter is mandatory for token authentication. | - |
| X-Sdk-Date | Time when the request is sent. The time is in YYYYMMDD'T'HHMMSS'Z' format. The value is the current Greenwich Mean Time (GMT) of the system. | This parameter is mandatory for AK/SK-based authentication, but not required for PKI token-based authentication | 20190307T101459Z |
| Authorization | Signature authentication information. The value is obtained from the request signature result and is required when the AK and SK are used to encrypt the signature. Type: string Default value: none | This parameter is mandatory for AK/SK-based authentication. | SDK-HMAC-SHA256 Credential=ZIRRKMTWPTQFQI1WKNKB/20150907//ec2/sdk_request, SignedHeaders=content-type;host;x-sdk-date, Signature=55741b610f3c9fa3ae40b5a8021ebf7ebc2a28a603fc62d25cb3bfe6608e1994 |
| Host | Information about the requested server. The value can be obtained from the URL of the service API. The value is hostname[:port]. If the port number is not specified, the default port is used. The default port number for https is 443. | This parameter is mandatory for AK/SK-based authentication. | code.test.com or code.test.com:443 |
For details about other parameters in the header, see the HTTPS protocol documentation.
Common Response Headers
| Parameter | Description | Mandatory |
|---|---|---|
| Content-Type | Media type of the message body sent to a receiver Type: string Default value: application/json; charset=UTF-8 | Yes |
| X-request-id | This field carries the request ID for task tracing. Type: string. request_id-timestamp-hostname (The request_id is the UUID generated on the server. timestamp indicates the current timestamp, and hostname is the name of the server that processes the current API.) Default value: none | No |
| X-ratelimit | This field carries the total number of flow control requests. Type: integer Default value: none | No |
| X-ratelimit-used | This field carries the number of remaining requests. Type: integer Default value: none | No |
| X-ratelimit-window | This field carries the flow control unit. Type: string. The unit is minute, hour, or day. Default value: hour | No |
Last Article: Public Data Structures
Next Article: Message Object Structures
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.