Every WAF API request and response shares a set of common parameters. This page describes those parameters and shows what a well-formed request and response look like.
Common request parameters
Include the following parameters in every API request.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Format | String | No | The response format. Valid values: JSON, XML. Default: XML. |
| Version | String | Yes | The API version in YYYY-MM-DD format. Set to 2019-09-10. |
| AccessKeyId | String | Yes | Your AccessKey ID. |
| Signature | String | Yes | The signature string of the current request. |
| SignatureMethod | String | Yes | The signature algorithm. Set to HMAC-SHA1. |
| Timestamp | String | Yes | The request timestamp in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ (UTC). Example: 2013-01-10T12:00:00Z represents January 10, 2013, 20:00:00 UTC+8. |
| SignatureVersion | String | Yes | The signature algorithm version. Set to 1.0. |
| SignatureNonce | String | Yes | A unique random string that prevents replay attacks. Use a different value for each request. |
| ResourceOwnerAccount | String | No | The Alibaba Cloud account that owns the resource to access. |
Example request
https://wafopenapi.cn-hangzhou.aliyuncs.com/?Action=DescribeDomainNames
&Region=cn
&InstanceId=waf_elasticity-cn-0xldbqtm005
&Timestamp=2013-01-10T12:00:00Z
&Format=xml
&AccessKeyId=********
&SignatureMethod=Hmac-SHA1
&SignatureNonce=NwDAxvLU6tFE0DVb
&Version=2019-09-10
&SignatureVersion=1.0
&Signature=SignatureCommon response parameters
WAF API responses follow standard HTTP conventions:
2xx — the call succeeded.
4xx or 5xx — the call failed.
Every response includes a RequestId, regardless of whether the call succeeded. Responses are returned in JSON or XML format. The default format is XML; set the Format request parameter to change it.
Sample responses
XML format
<?xml version="1.0" encoding="utf-8"?>
<!--Result root node-->
<InterfaceNameResponse>
<!--Request tag-->
<RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
<!--Return result data-->
</InterfaceNameResponse>JSON format
{
"RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
/*Return result data*/
}