This topic describes the common request parameters and common response parameters of the Serverless App Engine (SAE) API.

Common request parameters

Common request parameters must be included in all SAE API requests.

Parameter Example Required Description
Authorization acs <yourAccessKeyId>:<yourSignature> Yes The authentication information that is used to check the validity of a request. The string must follow the AccessKeyId:Signature format.
Content-Length 0 Yes The length of the HTTP request content. This length is specified in RFC 2616.
Content-Type application/json Yes The type of HTTP request content. This type must follow the format that is specified in RFC 2616.
Content-MD5 0e30656xxxxxxxxx0bc6f70bbdfe Yes 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 parameter tampering.
Date Mon, 26 Aug 2019 08:55:56 GMT Yes The time when a request is created. The time must be in GMT. If the time between when the request is sent and when the request is received exceeds 15 minutes, the request is deemed invalid.
Host sae.cn-beijing.aliyuncs.com Yes The endpoint of SAE, for example, sae.cn-hangzhou.aliyuncs.com.
Accept application/json Yes The type of response that is required by the client. Valid values: application/json and application/xml.
x-acs-version 1.0 Yes The version of the API. Set the value to 2019-05-06.
x-acs-region-id cn-beijing Yes The ID of the region.
x-acs-signature-nonce f63659d4-10ac-483b-99da-ea8fde61eae3 Yes A unique, random number that is used to prevent replay attacks. A different random number is required for each request.
x-acs-signature-method HMAC-SHA1 Yes The encryption method of the signature string. Set the value to HMAC-SHA1.

Examples

GET /pop/v1/paas/regionConfig HTTP/1.1
Host: sae.cn-beijing.aliyuncs.com
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: Mon, 26 Aug 2019 08:55:56 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 parameters

Every response returns a unique RequestID regardless of whether the call is successful. All responses are returned in a unified format. The 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 */
}