Version 2.4.7.20261116085428 · latest

CC matchers cc-matches

Conditions that identify requests in CC protection; reusable across rule groups.

Pick an endpoint to see its example call on the right.

ProtectionAuthentication: User (some parameters admin only)6 endpoints

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.

GET/api/v2/cc-matchesList CC matchers

Authentication: User (some parameters admin only)

Query parameters

FieldTypeDescription
pageinteger Page number, starting from 1
Default 1
page_sizeinteger Items per page
Default 20
sortstring Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id`
tenant_idinteger Admin only: filter by tenant (a malformed value returns 422). Ignored for tenant credentials, which only see their own tenant's data
namestring Filter by name substring.
ownerstring platform = platform objects only; tenant = tenant objects only.
Values ["platform","tenant"]
POST/api/v2/cc-matchesCreate CC matcher

Authentication: User (some parameters admin only)

Request body application/json

FieldTypeDescription
desstring Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object).
nameRequiredstring Name
whenobject 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.
POST/api/v2/cc-matches/replayReplay a CC matcher draft

Authentication: User (some parameters admin only)

Request body application/json

FieldTypeDescription
site_idinteger Count this site's traffic only; omitted = every site visible to the caller.
whenobject 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/api/v2/cc-matches/{id}Get CC matcher

Authentication: User (some parameters admin only)

PUT/api/v2/cc-matches/{id}Update CC matcher

Authentication: User (some parameters admin only)

Request body application/json

FieldTypeDescription
desstring Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object).
nameRequiredstring Name
whenobject 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/api/v2/cc-matches/{id}Delete CC matcher

Authentication: User (some parameters admin only)

CC matchers object

FieldTypeDescription
builtinboolean Built-in object; cannot be deleted.
read-only
created_atstring Created at
read-only
desstring Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object).
hitsinteger Requests matched in the window (restored by sample_weight).
idinteger Record ID
read-only
ipsinteger Distinct client IPs among the matched requests (a distinct count, not restored by sample weight).
namestring Name
reasonstring Explanation when supported=false.
sampledboolean Some rows in the window were sampled (sample_weight > 1); hits and total are estimates.
site_idinteger Count this site's traffic only; omitted = every site visible to the caller.
sitesinteger Distinct sites among the matched requests (a distinct count, not restored by sample weight).
supportedboolean false = the condition uses something access_log does not hold (request headers, accept_language, named sets), so nothing was replayed; see reason.
tenant_idinteger Owning tenant; null = platform object (built-in or created by an admin, read-only for tenants).
read-only
top_ipsCcMatchReplayIp[] Client IPs with the most matched requests, at most 20, sorted by requests descending; empty when supported=false or nothing matched.
top_urlsCcMatchReplayUrl[] URLs (without the query string) with the most matched requests, at most 5, sorted by requests descending; empty when supported=false or nothing matched.
totalinteger Total requests in the window (also restored).
updated_atstring Updated at
read-only
whenobject 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_hoursinteger Replay window in hours (fixed at 24).

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.

Success
{
  "id": 1,
  "name": "example"
}
List
{
  "items": [
    {
      "id": 1
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 1
}
Error
{
  "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"
}
Get started

Try the live demo

Open the live demo, or contact us for a quote and the install command