This topic lists the common request header and common response header in a request on the Container Service for Kubernetes API.

Common request header

Common request parameters must be included in all Container Service for Kubernetes API requests.

Parameter Example Required Description
Authorization acs <yourAccessKeyId>:<yourSignature> Yes The authentication information that is used to check the authenticity of the request. The string must follow the AccessKeyId:Signature format.
Content-Length 0 Yes The content length of the HTTP request defined in RFC 2616.
Content-Type application/json Yes The content type of the HTTP request defined in RFC 2616.
Content-MD5 0e30656xxxxxxxxx0bc6f70bbdfe Yes The Base64-encoded 128-bit MD5 hash value of the HTTP message body. We recommend that you set this parameter for all requests to prevent the requests from being tampered with.
Date Wed, 16 Dec 2015 11:18:47 GMT Yes The time when a request was created. Currently, only the GMT format is supported. If the deviation between the construction time and the MNS server time exceeds 15 minutes, an invalid request is returned.
Host Yes The domain name of the Container Service for Kubernetes API, for example,
Accept application/json Yes The type of the response required by the client. Valid values: application/json and application/xml.
x-acs-version 1.0 Yes The version number of the API. The current version is 2015-12-15.
x-acs-region-id cn-beijing Yes The ID of the region.
x-acs-signature-nonce f63659d4-10ac-483b-99da-ea8fde61eae3 Yes A unique number that is randomly generated to prevent network replay attacks. You must use different numbers for different requests.
x-acs-signature-method HMAC-SHA1 Yes The signature algorithm. Set the value to HMAC-SHA1.


GET /clusters HTTP/1.1
Accept: application/json
User-Agent: cs-sdk-python/0.0.1 (Darwin/15.2.0/x86_64;2.7.10)
x-acs-signature-nonce: f63659d4-10ac-483b-99da-ea8fde61eae3
Authorization: acs <yourAccessKeyId>:<yourSignature>
x-acs-signature-version: 1.0
Date: Wed, 16 Dec 2015 11:18:47 GMT
x-acs-signature-method: HMAC-SHA1
Content-Type: application/json;charset=utf-8
X-Acs-Region-Id: cn-beijing
Content-Length: 0

Common response header

Every response returns a unique request ID regardless of whether the call is successful. API responses use the HTTP response format where a 2xx status code indicates a successful call and a 4xx or 5xx status code indicates a failed call.

XML format

<? xml version="1.0" encoding="UTF-8"? >
<!—Result Root Node-->
<Interface Name+Response>
 | <!--Return Request Tag-->
 | <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
 | <!--Return Result Data-->
</Interface Name+Response>

JSON format

    "RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
    /* Return Result Data */