Version 2.4.8 · latest

Web tamper protection site-tamper-guards

Web tamper protection of one site: protected scopes (home page, pages, directories), what counts as tampering (structure only / any change), serving the baseline page or alerting only, and the observation period; baseline update and diff; part of WAF Enhanced.

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

ProtectionAuthentication: User (some parameters admin only)5 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/site-tamper-guards/{site_id}Get site web tamper protection settings

Authentication: User (some parameters admin only)

PUT/api/v2/site-tamper-guards/{site_id}Set site web tamper protection

Authentication: User (some parameters admin only)

Request body application/json

FieldTypeDescription
actionstring Action on tampering.
Values ["restore","log"]
enabledRequiredboolean Whether enabled.
expected_updated_atstring Optimistic lock - the updated_at as the caller read it (when null, i.e. never set, 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.
modestring What counts as tampering.
Values ["structure","full"]
observe_daysinteger Days observed after turning on.
scopesSiteTamperScope[] Protected scopes.
GET/api/v2/site-tamper-guards/{site_id}/diffGet site web tamper protection diff

Authentication: User (some parameters admin only)

Query parameters

FieldTypeDescription
pathRequiredstring Baseline page path (e.g. /, /about.html).
POST/api/v2/site-tamper-guards/{site_id}/rebaseUpdate site web tamper protection baseline

Authentication: User (some parameters admin only)

Web tamper protection object

FieldTypeDescription
actionstring Action on tampering.
Values ["restore","log"]
assetsSiteTamperAsset[] JS/CSS whose fingerprint differs (recorded only, not replaced).
base_atstring Baseline time (the last baseline update).
read-only
base_verinteger Baseline version, +1 on every baseline update; 0 = no baseline yet.
read-only
changesSiteTamperChange[] Structural changes (removed links and text changes are not listed).
enabledboolean Whether enabled.
expected_updated_atstring Optimistic lock - the updated_at as the caller read it (when null, i.e. never set, 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.
fetch_errorstring Why the page could not be fetched now (changes is then empty): fetch_failed = the origin did not return 200 or could not be reached; not_html = not a web page; too_large = over 1 MB. Absent when fetched.
Values ["fetch_failed","not_html","too_large"]
gatestring WAF Enhanced status of the site's tenant: full = editable; readonly = expired but within the read-only buffer (License.readonly_days, 7 days by default), still in effect but read-only; basic = not subscribed or past the buffer, nothing checked and settings kept.
read-onlyValues ["full","readonly","basic"]
gate_expired_atstring Administrator responses with gate_reason=expired only - when the platform WAF Enhanced license expired; not present in tenant responses.
read-only
gate_ownerWafGateOwner The owner of the site, in administrator responses only; tenant responses carry no one else's information.
read-only
gate_packagesstring[] Administrator responses only - names of the owner's unexpired packages (at most 20); not present in tenant responses.
read-only
gate_reasonWafGateReason Why WAF Enhanced (waf_enhanced) is not in effect; absent when gate is full or readonly. package = the platform is licensed but the owner has no unexpired package that includes WAF Enhanced; license = the platform has not enabled it (never licensed, revoked by the provider, or the license was disabled); expired = the platform license has expired and its read-only buffer period (License.readonly_days, default 7 days) has passed, so it fell back to basic.
read-onlyValues ["package","license","expired"]
modestring What counts as tampering.
Values ["structure","full"]
observe_daysinteger Days observed after turning on.
observe_untilstring End of the observation period; null = not observing (never on, or 0 days chosen).
read-only
pagesSiteTamperPage[] Baseline pages (sorted by path), including scopes that were not included and why.
read-only
pathstring Page path.
scopesSiteTamperScope[] Protected scopes.
site_idinteger Site ID
read-only
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"]
tamperedboolean Whether this counts as tampering under the site's mode.
updated_atstring Version (null if never set); use expected_updated_at on update.
read-only

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