edit-icon download-icon

Common Parameters

Last Updated: Aug 02, 2018

Common request parameters refer to parameters in an HTTP header, which are required by the API operations.

Name Data type Required Description
Authorization String Yes Authentication information used to verify a request. The string must use the AccessKeyId:Signature format.
Content-Type String Yes Type of the HTTP request content. You must set this parameter to application/octet-stream;charset=utf-8.
Content-MD5 String Yes The 128-bit MD5 hash value of the HTTP request body, which is encoded in Base64.
Date String Yes Date in GMT (defined in HTTP 1.1), for example, Wed, 05 Sep. 2017 23:00:00 GMT.
Accept String Yes Type of the data returned to the client. The available types include application and json.
x-acs-signature-nonce String Yes A unique string, which is randomly generated to prevent replay attacks. For different requests, you must use different strings.
x-acs-signature-method String Yes Signature calculation algorithm. Currently, only the HMAC-SHA1 algorithm is supported.
x-acs-version String Yes Api version. Currently, only the 2018-01-20 version is supported.

Example

  1. curl -X POST
  2. -H "date:Sat 27 Jan 2018 17:53:28 GMT"
  3. -H "authorization:acs LTAImbdzkTCRbiVT:/iCLnfleHOdhpc4n46wprduUDu="
  4. -H "content-md5:MACiECZtnLiNkNS1v5ZCAA=1"
  5. -H "content-type:application/octet-stream;charset=utf-8"
  6. -H "x-acs-signature-method:HMAC-SHA1"
  7. -H "x-acs-signature-nonce:123212345678231234"
  8. -H "x-acs-version:2018-01-20"
  9. -H "accept:application/json"
  10. -d "..."
  11. "http://imagesearch.cn-shanghai.aliyuncs.com/item/search?instanceName=$instanceName"

Common Response Parameters

All requests, including successful and failed, are replied with a unique ID (RequestId).

Example

JSON example:

  1. {
  2. "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
  3. /* Returned data */
  4. }
Thank you! We've received your feedback.