This topic provides the common request parameters and common responses of Container Registry (ACR) API operations.

Common request parameters

Common request parameters must be included in all API requests.

Parameter Description Required
Authorization The authentication information used to check the authenticity of a request. Format: AccessKeyId:Signature. Yes
Content-Length The length of the HTTP request body. The length is defined in RFC 2616. Yes
Content-Type The type of HTTP request body. The type is defined in RFC 2616. Yes
Content-MD5 The Base64-encoded 128-bit MD5 hash value of the HTTP request body. We recommend that you set this parameter for all requests to prevent them from being tampered with. Yes
Date The time when the request was created. The time must be in GMT. If the deviation between the time when the request was sent and the time when the request was received exceeds 15 minutes, the request is considered invalid. Yes
Host The URL of the host to which the request is sent. Example: Yes
Accept The type of response that is required by the client. Valid values: application/json and application/xml. Yes
x-acs-version The version number of the API. For more information, see Version. Yes
x-acs-region-id The region where the container image is located. For more information, see Region list. Yes
x-acs-signature-nonce A unique, random number used to prevent replay attacks. You must use different numbers for different requests. Yes
x-acs-signature-method The encryption method of the signature string. Set the value to HMAC-SHA1. Yes
GET /namespaces HTTP/1.1
Authorization: acs ACSbW2iBbyX1Pk9N:mp/6Wdr18V3qAc5gbgsqMe/iB0c
Content-Length: 0
Content-Type: application/json;charset=utf-8
Date: Wed, 23 May 2018 12:00:01 GMT
Accept: application/json
x-acs-version: 2016-06-07       
x-acs-region-id: cn-hangzhou
x-acs-signature-nonce: f63659d4-10ac-483b-99da-ea8fde61eae3
x-acs-signature-version: 1.0
x-acs-signature-method: HMAC-SHA1
User-Agent: cr-sdk-python/3.0.0 (Darwin/15.2.0/x86_64;2.7.10)

Common responses

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


XML format:

<? xml version="1.0" encoding="UTF-8"? >

<Interface Name+Response>
  <! --Return Request Tag-->
  <! --Return Result Data-->
</Interface Name+Response>

JSON format:

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