Version 2.1.1792967583 · latest Download OpenAPI Markdown

Value-added protection schemes

One scheme each for replay, data leak and web tamper protection (one per tenant; admins edit the platform scheme); saving also updates sites that follow the scheme, sites with their own settings are left alone; part of WAF Enhanced.

protect-schemesProtectionAuthentication: User (some parameters admin only)9 endpoints

Get the data leak protection scheme

GET/api/v2/protect-schemes/leak
Authentication: User (some parameters admin only)

Save the data leak protection scheme

PUT/api/v2/protect-schemes/leak
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
customSiteLeakGuardCustom[]Required Custom regular expressions, at most 16.
detectSiteLeakGuardDetectRequired Action per built-in pattern; omit a pattern to not check it.
excludestring[]Required Path prefixes that are not checked (a trailing * is optional), at most 32.
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when null, i.e. never saved, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
observe_daysintegerRequired Days a site observes when turned on by the scheme (record only, no action); 0 = act right away.

Get the replay protection scheme

GET/api/v2/protect-schemes/replay
Authentication: User (some parameters admin only)

Save the replay protection scheme

PUT/api/v2/protect-schemes/replay
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
actionReplayGuardAction— Without a token or on replay: block = 403; challenge = JS challenge. Omitted = block.
Values ["block","challenge"]
app_saltstring— Signing salt (app key, 32-byte hex); with app_sign on but no salt, signed headers are never accepted.
app_signboolean— App signed-header mode - requests carrying the signature headers are checked by signature, no token needed.
bind_ipboolean— Also bind the token to the client IP (a new IP invalidates it).
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when null, i.e. never saved, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
methodsReplayGuardMethod[]— Protected methods; omitted = POST/PUT/PATCH/DELETE.
pathsReplayGuardPath[]— Protected API paths, at most 64; empty = nothing protected.
ttl_sinteger— Token lifetime in seconds, also used for signed-header timestamps; omitted = 120.

Get the web tamper protection scheme

GET/api/v2/protect-schemes/tamper
Authentication: User (some parameters admin only)

Save the web tamper protection scheme

PUT/api/v2/protect-schemes/tamper
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
actionReplayGuardActionRequired Without a token or on replay: block = 403; challenge = JS challenge. Omitted = block.
Values ["block","challenge"]
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when null, i.e. never saved, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
modestringRequired What counts as tampering: structure = structural changes only; full = any change to the page.
Values ["structure","full"]
observe_daysintegerRequired Days a site observes when turned on by the scheme (record only, no action); 0 = act right away.
scopesSiteTamperScope[]Required Protected scopes, at most 50.

Apply the scheme to sites in bulk

POST/api/v2/protect-schemes/{kind}/apply
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
auto_joinobject— The rule that sites newly entering the range join the scheme automatically; omitted when off.
dry_runboolean— When true, only return the counts of what would happen; nothing is written.
Default false
override_customboolean— When true, sites with their own settings are switched to the scheme too; by default they are left alone and counted in skipped_custom.
Default false
selectionProtectSchemeSelectionRequired The range of sites to apply to.

List the sites that have this protection set up

GET/api/v2/protect-schemes/{kind}/sites
Authentication: User (some parameters admin only)

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
tenant_idinteger— Admin only: filter by tenant. Ignored for tenant credentials, which only see their own tenant's data
qstring— Fuzzy search by domain or site name (case-insensitive).
statusProtectSchemeSiteStatus— Filter by status.
Values ["enabled","disabled","pending","capture_failed"]
sourceProtectSiteSource— Filter by source: scheme = follows the scheme; custom = set for the site alone (including turned off).
read-onlyValues ["scheme","custom"]

Reset or turn off this protection for many sites

POST/api/v2/protect-schemes/{kind}/sites/bulk
Authentication: User (some parameters admin only)

Request body application/json

FieldTypeRequiredDescription
actionReplayGuardActionRequired Without a token or on replay: block = 403; challenge = JS challenge. Omitted = block.
Values ["block","challenge"]
filterProtectSchemeSiteFilter— The same filters as the list; expanded to a set of sites by the server.
idsinteger[]— Site ids.

Value-added protection schemes object

FieldTypeRequiredDescription
actionReplayGuardAction— Without a token or on replay: block = 403; challenge = JS challenge. Omitted = block.
Values ["block","challenge"]
app_saltstring— Signing salt (app key, 32-byte hex); with app_sign on but no salt, signed headers are never accepted.
app_signboolean— App signed-header mode - requests carrying the signature headers are checked by signature, no token needed.
appliedinteger— Sites written (to be written on dry_run).
auto_joinobject— The rule that sites newly entering the range join the scheme automatically; omitted when off.
read-only
bind_ipboolean— Also bind the token to the client IP (a new IP invalidates it).
countsProtectSchemeCounts— Site counts among the sites visible to the caller: total, turned on, following the scheme, and set alone.
read-only
customSiteLeakGuardCustom[]— Custom regular expressions, at most 16.
demoted_sitesinteger— Sites switched to their own settings with values kept because their owner lacks WAF Enhanced (only in the save response).
read-only
detectSiteLeakGuardDetect— Action per built-in pattern; omit a pattern to not check it.
domainstring— Primary domain (the site name when there is none).
dry_runboolean— When true, only return the counts of what would happen; nothing is written.
Default false
enabledboolean— Whether it is on.
excludestring[]— Path prefixes that are not checked (a trailing * is optional), at most 32.
expected_updated_atstring— Optimistic lock - the updated_at as the caller read it (when null, i.e. never saved, use 1970-01-01T00:00:00Z). If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check.
failedProtectSchemeFailure[]— Sites that could not be handled, with the reason; at most 100.
failed_totalinteger— Total sites that could not be handled (larger than failed when truncated).
filterProtectSchemeSiteFilter— The same filters as the list; expanded to a set of sites by the server.
gateProtectSchemeGate— WAF Enhanced status of the scheme owner (the tenant or the platform): full = editable; readonly and basic = may only be reduced.
read-onlyValues ["full","readonly","basic"]
idsinteger[]— Site ids.
matchedinteger— Sites in the range the caller can see.
methodsReplayGuardMethod[]— Protected methods; omitted = POST/PUT/PATCH/DELETE.
modestring— What counts as tampering: structure = structural changes only; full = any change to the page.
Values ["structure","full"]
observe_daysinteger— Days a site observes when turned on by the scheme (record only, no action); 0 = act right away.
observe_untilinteger— End of the observation period (Unix milliseconds); set only for leak protection that is on and still observing, null when expired, never observing, off, or for other protections.
override_customboolean— When true, sites with their own settings are switched to the scheme too; by default they are left alone and counted in skipped_custom.
Default false
ownerstring— Owner username.
pathsReplayGuardPath[]— Protected API paths, at most 64; empty = nothing protected.
scopesSiteTamperScope[]— Protected scopes, at most 50.
selectionProtectSchemeSelectionRequired The range of sites to apply to.
site_idinteger— Site id.
skipped_custominteger— Sites left alone because they have their own settings (override_custom is false).
skipped_gateinteger— Sites not written because their owner's WAF Enhanced is not full.
sourceProtectSiteSource— Where the site's setting comes from: scheme = follows the scheme (changes when the scheme is saved); custom = set for this site alone (including turned off and rows migrated from before).
read-onlyValues ["scheme","custom"]
statusProtectSchemeSiteStatus— Status of the site's setting: enabled; disabled; pending = on but the tamper baseline is still queued; capture_failed = on but baseline capture failed repeatedly and stopped retrying (the last two exist for web tamper protection only).
Values ["enabled","disabled","pending","capture_failed"]
tenant_idinteger— Owner user id.
today_blockedinteger— Block and error-page count today (UTC), excluding hits during the observation period (leak protection only, same basis as counts.today_blocked in the scheme response); null for other protections, or when ClickHouse is unavailable or the query fails.
today_hitsinteger— Hits today (data leak protection = masked plus blocked outside the observation period, i.e. today_masked + today_blocked; web tamper protection = pages found tampered today); null for replay protection.
today_maskedinteger— Masking count today (UTC), excluding hits during the observation period (leak protection only, same basis as counts.today_masked in the scheme response); null for other protections, or when ClickHouse is unavailable or the query fails.
ttl_sinteger— Token lifetime in seconds, also used for signed-header timestamps; omitted = 120.
updated_atstring— Version (null if never saved); use expected_updated_at on update.
read-only
updated_sitesinteger— Sites following the scheme that this save updated (only in the save response).
read-only