Skip to content

Response, session and data protection API Since v0.1 ​

Most areas follow one pattern: a settings route, named list routes, an inventory or status route, a key rotation route and a test route that never changes configuration. For the keys, see Response, session and data protection policy and Files, positive model, virtual patches and validation policy.

For the base URL, sign-in, roles and error format, see Management API. Except sign-in, a route answers 401 without credentials and 403 when the role is too low.

Routes ​

Response ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/apps/{name}/responseviewerReturns response signature settings.Returns the current values with base_version.
PUT/v1/apps/{name}/responseoperatorChanges response signature settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/headersviewerReturns header hardening settings.Returns the current values with base_version.
PUT/v1/apps/{name}/headersoperatorChanges header hardening settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/headers/lists/{list}viewerReturns one header list.Returns the current values with base_version.
PUT/v1/apps/{name}/headers/lists/{list}operatorReplaces one header list.Body: items (the whole list; [] removes it), base_version, comment, dry_run.
GET/v1/apps/{name}/headers/postureviewerShows the upstream's header posture and reported CSP violations.none

Cookies ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/apps/{name}/cookiesviewerReturns cookie protection settings.Returns the current values with base_version.
PUT/v1/apps/{name}/cookiesoperatorChanges cookie protection settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/cookies/lists/{list}viewerReturns one cookie list.Returns the current values with base_version.
PUT/v1/apps/{name}/cookies/lists/{list}operatorReplaces one cookie list.Body: items (the whole list; [] removes it), base_version, comment, dry_run.
GET/v1/apps/{name}/cookies/inventoryviewerLists cookies the application has set.none
GET/v1/apps/{name}/cookies/keysviewerReturns the cookie key status (not the keys).none
POST/v1/apps/{name}/cookies/keys/rotateoperatorRotates the cookie signing key.none

Sessions, CSRF and CORS ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/apps/{name}/sessionsviewerReturns session protection settings.Returns the current values with base_version.
PUT/v1/apps/{name}/sessionsoperatorChanges session protection settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/sessions/mismatchesviewerLists sessions seen from a changed client.none
GET/v1/apps/{name}/sessions/keysviewerReturns the session key status (not the keys).none
POST/v1/apps/{name}/sessions/keys/rotateoperatorRotates the session key.none
GET/v1/apps/{name}/csrfviewerReturns CSRF protection settings.Returns the current values with base_version.
PUT/v1/apps/{name}/csrfoperatorChanges CSRF protection settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/csrf/keysviewerReturns the CSRF key status (not the keys).none
POST/v1/apps/{name}/csrf/keys/rotateoperatorRotates the CSRF key.none
GET/v1/apps/{name}/corsviewerReturns CORS settings.Returns the current values with base_version.
PUT/v1/apps/{name}/corsoperatorChanges CORS settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/cors/lists/{list}viewerReturns one CORS list.Returns the current values with base_version.
PUT/v1/apps/{name}/cors/lists/{list}operatorReplaces one CORS list.Body: items (the whole list; [] removes it), base_version, comment, dry_run.
POST/v1/apps/{name}/cors/testviewerShows how a described cross-origin request is handled.Body: method, path, host, scheme, origin, sec_fetch_site, request_method, request_headers.

Data leak masking and files ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/apps/{name}/dlpviewerReturns data leak masking settings.Returns the current values with base_version.
PUT/v1/apps/{name}/dlpoperatorChanges data leak masking settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/dlp/lists/{list}viewerReturns one masking list.Returns the current values with base_version.
PUT/v1/apps/{name}/dlp/lists/{list}operatorReplaces one masking list.Body: items (the whole list; [] removes it), base_version, comment, dry_run.
POST/v1/apps/{name}/dlp/testviewerRuns sample text through the masking rules.Body: text. Response: rule, action, count, masked.
GET/v1/apps/{name}/filesviewerReturns file upload settings.Returns the current values with base_version.
PUT/v1/apps/{name}/filesoperatorChanges file upload settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
GET/v1/apps/{name}/files/lists/{list}viewerReturns one file list.Returns the current values with base_version.
PUT/v1/apps/{name}/files/lists/{list}operatorReplaces one file list.Body: items (the whole list; [] removes it), base_version, comment, dry_run.
POST/v1/apps/{name}/files/testviewerShows how a described upload is treated.Body: path, name, content_type, data. Response: rule, action.

Virtual patches ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/apps/{name}/vpatchviewerLists imported scanner reports and applied patches.none
POST/v1/apps/{name}/vpatch/reportsoperatorImports a scanner report.Body: name, data, base_version.
GET/v1/apps/{name}/vpatch/reports/{id}viewerReturns one imported report with its findings.none
DELETE/v1/apps/{name}/vpatch/reports/{id}operatorDeletes an imported report.none
POST/v1/apps/{name}/vpatch/applyoperatorCreates virtual patches from chosen findings.Body: report, findings, ids, base_version, comment, dry_run.
POST/v1/apps/{name}/vpatch/removeoperatorRemoves virtual patches.Body: ids, base_version, comment, dry_run.

Client-side scripts ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/apps/{name}/scripts Since v0.2viewerLists scripts the application's pages load.none
GET/v1/apps/{name}/scripts/history Since v0.2viewerShows when scripts changed.none
GET/v1/apps/{name}/scripts/settings Since v0.2viewerReturns script watch settings.Returns the current values with base_version.
PUT/v1/apps/{name}/scripts/settings Since v0.2operatorChanges script watch settings.Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run.
POST/v1/apps/{name}/scripts/check Since v0.2operatorChecks the application's scripts now.none
POST/v1/apps/{name}/scripts/confirm Since v0.2operatorConfirms a script as expected.Body: hash, url, base_version, comment, dry_run.

Example ​

sh
curl -sk -H "Authorization: Bearer waap_EXAMPLE" https://127.0.0.1:9443/v1/apps/shop/headers/posture