WAF rule library waf-rules
The WAF rule package version the master distributes, node alignment and the protection list (paid feature rules_update; nodes use 23 built-in rules when it is off).
Pick an endpoint to see its example call on the right.
Authentication
Send the X-API-Key header (create a key on the API Keys page; the key is shown only once at creation). An Authorization: Bearer token obtained by logging in also works.
X-API-Key
Authentication failures return 401; forbidden returns 403 (code such as insufficient_scope).
Conventions
Paging uses page (from 1) and page_size; sort with sort=field or sort=-field.
Times are RFC 3339 (UTC); amounts are in cents.
Writes return 200/201/204 on success; duplicates of a unique key return 409.
/api/v2/waf-rulesGet WAF rule library version
Authentication: User
/api/v2/waf-rules/protectionsList WAF protections
Authentication: User
Query parameters
| Field | Type | Description |
|---|---|---|
q | string | Search term: rule ID, title, product name or vulnerability ID (e.g. ThinkPHP, CVE-2021-44228). |
class | WafRuleClass | Class: general, patch (vulnerability patch), emergency, custom; omit for all. |
product_class | WafProductClass | Product class: cms, framework, middleware, component, other (rules without products count as other); matches when any product of the rule is in the class; omit for all. Available classes and counts are in product_classes of the response. |
stack | WafStack[] | Tech stack; repeat for several (any matches); omit for all. Options and counts are in categories.stacks of the response. |
attack | WafAttack[] | Attack type; repeat for several (any matches); omit for all. With stack both must match. Options and counts are in categories.attacks of the response. |
source | string | Source: builtin (built into the node), package (rule package), custom (written by the provider); omit for all sources. It scopes the whole list (items, counts, product_classes and categories share the scope). |
format | string | csv = export all filtered entries as a CSV attachment; omit for paged JSON. |
page | integer | Page number, starting from 1 |
page_size | integer | Items per page |
WAF rule library object
| Field | Type | Description |
|---|---|---|
added | string | Version that added the rule (first package version containing it; the version is the release date); empty for built-in rules. |
attack | WafAttack | Attack type: rce (remote code execution), sqli (SQL injection), xss, lfi (path traversal), rfi (remote file inclusion), protocol (protocol violation), scanner, other. From the attack category of the detection rule in the package; language categories (php, java, nodejs) count as rce and a missing category as other; entries without a detection rule in the package have none. |
builtin | boolean | No rule package has ever been fetched; nodes use the 23 built-in rules. |
class | WafRuleClass | Rule class: general, patch (vulnerability patch), emergency, custom. |
cves | string[] | Vulnerability IDs (CVE, CNVD, etc.). |
enabled | boolean | Whether the paid feature rules_update is enabled (when off or expired, updates stop and the last package keeps being distributed). |
error | string | Why the latest round did not switch to the newest package (admins only). |
halt | string | Why updates are halted by the license (expired, disabled, or the super admin unreachable for long) (admins only; not a failure, separate from error; absent when not halted). |
id | integer | Rule ID (vendor 94xxxx, custom 990000–999999). |
latest_version | string | Latest package version in the license (admins only; differs from version when not yet switched). |
level | string | Lowest protection level the rule applies at: basic, standard, strict. |
nodes | WafRulesNodes | Node alignment (by the rule package each node reports in its heartbeat; admins only). |
observe_days_left | integer | Days left in the observation period (a partial day counts as one); present only when status=observing. |
product_class | WafProductClass | Product class: cms, framework, middleware, component, other. Derived from the product names of the rule; the first non-other class wins when a rule covers several products, and a rule without products is other. |
products | string[] | Products covered. |
rules | integer | Number of rules in use (23 when builtin). |
sha256 | string | SHA-256 of the current package manifest; absent when builtin. |
source | string | builtin: built into the node; package: rule package; custom: written by the provider (990000–999999). |
stack | WafStack | Tech stack: php, java, nodejs, python, dotnet. Taken from the rule package mark, otherwise from a language attack category (php, java, nodejs); rules it cannot be derived for have none. |
status | string | Disposition: block; observing (a new rule only logs at first, and its hits carry the observe-only new-rule mark in WAF events). Always block for built-in and emergency rules or when the observe days is 0. |
synced_at | string | Time of the latest check. |
title | string | What it protects; rule name for built-in rules. |
title_en | string | What it protects, in English. |
type | string | Type (e.g. remote code execution); attack category (e.g. sqli) for built-in rules. |
version | string | Current package version (e.g. 2026.10.19); empty when builtin. |
Responses and errors
Success returns the resource JSON directly (HTTP 2xx); failures return application/problem+json (code, detail, plus errors on validation failures); lists carry items + total.
{
"id": 1,
"name": "example"
}{
"items": [
{
"id": 1
}
],
"page": 1,
"page_size": 20,
"total": 1
}{
"code": "validation_failed",
"detail": "Invalid request parameters",
"errors": [
{
"code": "required",
"field": "/name",
"message": "name is required"
}
],
"request_id": "0123456789abcdef",
"status": 422,
"title": "Unprocessable Entity",
"type": "about:blank"
}