All Products
Search
Document Center

Edge Security Acceleration:GetWafFilter

Last Updated:Nov 07, 2025

Queries the conditions for matching incoming requests that are configured in a WAF rule category for a website. These conditions define how WAF detects and processes different types of requests.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:GetWafFilterget
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SiteIdlongNo

The website ID, which can be obtained by calling the ListSites operation.

1
PhasestringNo

The WAF rule category to which the filter conditions to query belong.

http_bot
TargetstringNo

The condition for matching incoming requests.

characteristics
TypestringNo

The rule type.

http_custom_cc

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

36af3fcc-43d0-441c-86b1-428951dc8225
Filterobject

The returned match conditions.

Phasestring

The WAF rule category.

http_bot
Targetstring

The condition for matching incoming requests.

characteristics
Typestring

The rule type.

http_custom_cc
Fieldsarray<object>

The matched objects and related properties.

fieldobject

The properties of the matched object.

Labelstring

The label of the matched object.

Header
Keystring

The field for matched objects in the system.

http.request.headers
Subboolean

Indicates whether the matched object contains a subfield.

true
SubTipstring

The tip on how to enter a subfield.

e.g. Content-Type
Selectorobject

The selector, which defines how to select a matched object.

Kindstring

The type of selector. Valid values: data and others.

data
Dataarray<object>

The data. This parameter is available only when the value of the Kind parameter is data.

Dataobject

The data. This parameter is available only when the value of the Kind parameter is data.

Labelstring

The label of the data.

China
Valuestring

The value of the data.

CN
Logicsarray<object>

The logical conditions.

Logicobject

The properties of the logical operator applicable to the matched object.

Symbolstring

The matching characters in the system.

eq
Operatorstring

The displayed matching characters.

Does not equal
Negativeboolean

Indicates whether the match result is inverted.

Typestring

The type of the value. Valid values:

  • integer
  • integer_slice
  • string
  • string_slice
string
Kindstring

The type of the value input box. Valid values:

  • select:single
  • select:multi
  • input:single
  • input:multi
input:single
Attributesinteger

A custom attribute. For example, this parameter can specify whether the value is case-sensitive.

1
Tipstring

The tip on how to enter a valid value that is required by the rules.

e.g. image/jpeg
Validatorobject

The validator, which defines the validation rules for a value.

LengthWafQuotaInteger

The length of the value.

Patternstring

The regular expression pattern of the value, which is used to validate strings.

^example$
RangeWafQuotaInteger

The range of the value, which is used to validate numbers.

ErrMsgstring

The error message when the validation fails.

Enter a valid expression

Examples

Sample success responses

JSONformat

{
  "RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
  "Filter": {
    "Phase": "http_bot",
    "Target": "characteristics",
    "Type": "http_custom_cc",
    "Fields": [
      {
        "Label": "Header",
        "Key": "http.request.headers",
        "Sub": true,
        "SubTip": "e.g. Content-Type",
        "Selector": {
          "Kind": "data",
          "Data": [
            {
              "Label": "China",
              "Value": "CN"
            }
          ]
        },
        "Logics": [
          {
            "Symbol": "eq",
            "Operator": "Does not equal",
            "Negative": true,
            "Type": "string",
            "Kind": "input:single",
            "Attributes": 1,
            "Tip": "e.g. image/jpeg",
            "Validator": {
              "Length": {
                "Equal": 1,
                "GreaterThan": 1,
                "GreaterThanOrEqual": 1,
                "LessThan": 1,
                "LessThanOrEqual": 1
              },
              "Pattern": "^example$",
              "Range": {
                "Equal": 1,
                "GreaterThan": 1,
                "GreaterThanOrEqual": 1,
                "LessThan": 1,
                "LessThanOrEqual": 1
              },
              "ErrMsg": "Enter a valid expression"
            }
          }
        ]
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-02-27The Error code has changed. The response structure of the API has changedView Change Details
2024-09-25The Error code has changedView Change Details
2024-09-18The Error code has changedView Change Details