CC matchers
Conditions that identify requests in CC protection; reusable across rule groups.
cc-matchesProtectionAuthentication: User (some parameters admin only)6 endpointsList CC matchers
GET
/api/v2/cc-matchesAuthentication: User (some parameters admin only)
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | — | Page number, starting from 1 |
| page_size | integer | — | Items per page |
| sort | string | — | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
| tenant_id | integer | — | Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data |
| name | string | — | Filter by name substring. |
| owner | string | — | platform = platform objects only; tenant = tenant objects only. |
Create CC matcher
POST
/api/v2/cc-matchesAuthentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| des | string | — | Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object). |
| name | string | Required | Name |
| when | object | — | Rule DSL condition: a combination of all/any/not, or a leaf {f, op, v, set, neg}; validated by the server and errors are returned as 422 (field is a JSON Pointer, code is the lowercase DSL error code). null = match everything. |
Replay a CC matcher draft
POST
/api/v2/cc-matches/replayAuthentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| site_id | integer | — | Count this site's traffic only; omitted = every site visible to the caller. |
| when | object | — | Rule DSL condition: a combination of all/any/not, or a leaf {f, op, v, set, neg}; validated by the server and errors are returned as 422 (field is a JSON Pointer, code is the lowercase DSL error code). null = match everything. |
Get CC matcher
GET
/api/v2/cc-matches/{id}Authentication: User (some parameters admin only)
Update CC matcher
PUT
/api/v2/cc-matches/{id}Authentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| des | string | — | Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object). |
| name | string | Required | Name |
| when | object | — | Rule DSL condition: a combination of all/any/not, or a leaf {f, op, v, set, neg}; validated by the server and errors are returned as 422 (field is a JSON Pointer, code is the lowercase DSL error code). null = match everything. |
Delete CC matcher
DELETE
/api/v2/cc-matches/{id}Authentication: User (some parameters admin only)
CC matchers object
| Field | Type | Required | Description |
|---|---|---|---|
| builtin | boolean | — | Built-in object; cannot be deleted. |
| created_at | string | — | Created at |
| des | string | — | Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object). |
| hits | integer | — | Requests matched in the window (restored by sample_weight). |
| id | integer | — | Record ID |
| ips | integer | — | Distinct client IPs among the matched requests (a distinct count, not restored by sample weight). |
| name | string | — | Name |
| reason | string | — | Explanation when supported=false. |
| sampled | boolean | — | Some rows in the window were sampled (sample_weight > 1); hits and total are estimates. |
| site_id | integer | — | Count this site's traffic only; omitted = every site visible to the caller. |
| sites | integer | — | Distinct sites among the matched requests (a distinct count, not restored by sample weight). |
| supported | boolean | — | false = the condition uses something access_log does not hold (request headers, accept_language, named sets), so nothing was replayed; see reason. |
| tenant_id | integer | — | Owning tenant; null = platform object (built-in or created by an admin, read-only for tenants). |
| top_ips | CcMatchReplayIp[] | — | Client IPs with the most matched requests, at most 20, sorted by requests descending; empty when supported=false or nothing matched. |
| top_urls | CcMatchReplayUrl[] | — | URLs (without the query string) with the most matched requests, at most 5, sorted by requests descending; empty when supported=false or nothing matched. |
| total | integer | — | Total requests in the window (also restored). |
| updated_at | string | — | Updated at |
| when | object | — | Rule DSL condition: a combination of all/any/not, or a leaf {f, op, v, set, neg}; validated by the server and errors are returned as 422 (field is a JSON Pointer, code is the lowercase DSL error code). null = match everything. |
| window_hours | integer | — | Replay window in hours (fixed at 24). |