Help Center/ Anti-DDoS Service/ API Reference/ AAD APIs/ AAD Protection Policies/ Querying the Frequency Control Rule List
Updated on 2026-09-10 GMT+08:00

Querying the Frequency Control Rule List

Function

This API is used to query the frequency control rule list.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v2/aad/policies/waf/frequency-control-rule

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

domain_name

Yes

String

Domain name

overseas_type

No

Integer

Protected region. The default value is 0.

  • 0: Chinese mainland

  • 1: Outside Chinese mainland

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. The token can be obtained through the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

Yes

String

Content-Type

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total

Integer

Total number.

items

Array of FrequencyControlRule objects

Project.

Table 4 FrequencyControlRule

Parameter

Type

Description

id

String

id

name

String

Rule name.

limit_num

Integer

Rate limit frequency.

limit_period

Integer

Rate limit period.

lock_time

Integer

Blocking duration.

tag_type

String

Rate limiting mode: source rate limiting and destination rate limiting.

Source traffic limiting

  • ip: IP-based rate limiting. Website visitors are identified by their IP addresses.

  • cookie: Cookie-based rate limiting. Website visitors are identified by the key value of their cookies.

  • header: Header-based rate limiting. Website visitors are identified by their headers.

  • other: Referer-based rate limiting. Website visitors are identified by the Referer field (user-defined request source).

Destination traffic limiting:

  • policy: rule-based rate limiting

  • domain: domain name-based rate limiting

  • url: URL rate limiting

tag_index

String

User ID. This parameter is required if you set the user-based rate limiting (cookie or header).

If you select cookie, enter the cookie field name.

If you select header, enter the custom HTTP header to be protected.

tag_condition

TagCondition object

User ID.

action

ActionInfo object

Protection action.

conditions

Array of FrequencyControlCondition objects

Rate limit condition

unlock_num

Integer

Allowable frequency.

domain_aggregation

Boolean

Domain name request aggregation statistics.

region_aggregation

Boolean

Global request counting.

captcha_lock_time

Integer

Lock verification.

grayscale_time

Boolean

Whether to take effect in gray mode.

  • false: The rule takes effect immediately.

Table 5 TagCondition

Parameter

Type

Description

category

String

User identifier field. The value is fixed at referer.

contents

Array of strings

User identifier field content.

Table 6 ActionInfo

Parameter

Type

Description

category

String

Protection type. Source traffic rate limiting. In other modes, CAPTCHA and log-only are not supported.

  • captcha: A verification code is required.

  • block

  • dynamic_block: block dynamically

  • log: log only.

  • js_challenge: JavaScript challenge

detail

DetailInfo object

Block page information. Only the protection actions block and dynamic_block are supported.

Table 7 DetailInfo

Parameter

Type

Description

response

PageRespInfo object

Block page information.

Table 8 PageRespInfo

Parameter

Type

Description

content_type

String

Block page type. Custom block page. The value can be:

  • application/json

  • text/html

  • text/xml

content

String

Block page content. Mandatory for custom block pages. The value can contain a maximum of 8192 characters.

Table 9 FrequencyControlCondition

Parameter

Type

Description

category

String

Field type. The options are as follows:

  • url: path.

  • ip: IPv4.

  • ipv6: IPv6

  • params: Params

  • cookie: Cookie.

  • header: Header.

  • response_code: Response Code.

index

String

Subfield.

  • If the field type is ip or ipv6, index is mandatory. Its value must be client-ip for client IP addresses,** x-forwarded-for** for X-Forwarded-For, or ** $remote_addr** for TCP connection IP addresses.

  • If the matching logic is set to num_greater, num_less, num_equal, or num_not_equal, this parameter must be left empty.

  • If this parameter is not left empty, the maximum length cannot exceed 2,048 characters.

If category is set to params, cookie, or header, this parameter is mandatory. Set this parameter based on the site requirements.

logic_operation

String

Condition matching logic.

  • If category is set to url, the matching logic can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, not_suffix, len_greater, len_less, len_equal, or len_not_equal.

  • If category is set to ip, ipv6, or response_code, the matching logic can be equal or not_equal.

  • If category is set to params, cookie, or header, the matching logic can be contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, not_suffix, len_greater, len_less, len_equal, len_not_equal, num_greater, num_less, num_equal, num_not_equal, exist, or not_exist.

contents

Array of strings

Content for the matching logic in the condition list.

  • If the matching logic is set to exist or not_exist, contents must be left blank. In other cases, contents is mandatory and cannot exceed 2,048 characters.

  • If category is set to response_code, the status code for contents ranges from 200 to 599. The regular expression is ^(?:[2-5]\d{2})$.

  • If the matching logic contains len, the value of contents must be an integer ranging from 0 to 65,535. If the match logic contains num, the value of contents must be an integer ranging from 0 to 512.

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_description

String

Error description.

Example Requests

Query the frequency control rule list for the domain name 74af0d26xxxxxxxxx579b0ccd.

GET https://{endpoint}/v2/aad/policies/waf/frequency-control-rule?domain_name=74af0d26xxxxxxxxx579b0ccd

Example Responses

Status code: 200

{
  "total" : 1,
  "items" : [ {
    "id" : "09e8cab1-xxxx-xxxx-xxxx-57f9fc851118",
    "name" : "test",
    "action" : {
      "category" : "captcha"
    },
    "conditions" : [ {
      "category" : "url",
      "contents" : [ "100" ],
      "logic_operation" : "contain"
    }, {
      "category" : "ip",
      "index" : "client-ip",
      "contents" : [ "1.x.x.1" ],
      "logic_operation" : "equal"
    } ],
    "limit_num" : "2",
    "limit_period" : "60",
    "lock_time" : "0",
    "tag_type" : "ip",
    "domain_aggregation" : true,
    "region_aggregation" : true,
    "captcha_lock_time" : 60,
    "grayscale_time" : false
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Error response

Error Codes

See Error Codes.