Appearance
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
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/response | viewer | Returns response signature settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/response | operator | Changes response signature settings. | Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run. |
GET | /v1/apps/{name}/headers | viewer | Returns header hardening settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/headers | operator | Changes 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} | viewer | Returns one header list. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/headers/lists/{list} | operator | Replaces one header list. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
GET | /v1/apps/{name}/headers/posture | viewer | Shows the upstream's header posture and reported CSP violations. | none |
Cookies
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/cookies | viewer | Returns cookie protection settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/cookies | operator | Changes 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} | viewer | Returns one cookie list. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/cookies/lists/{list} | operator | Replaces one cookie list. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
GET | /v1/apps/{name}/cookies/inventory | viewer | Lists cookies the application has set. | none |
GET | /v1/apps/{name}/cookies/keys | viewer | Returns the cookie key status (not the keys). | none |
POST | /v1/apps/{name}/cookies/keys/rotate | operator | Rotates the cookie signing key. | none |
Sessions, CSRF and CORS
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/sessions | viewer | Returns session protection settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/sessions | operator | Changes session protection settings. | Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run. |
GET | /v1/apps/{name}/sessions/mismatches | viewer | Lists sessions seen from a changed client. | none |
GET | /v1/apps/{name}/sessions/keys | viewer | Returns the session key status (not the keys). | none |
POST | /v1/apps/{name}/sessions/keys/rotate | operator | Rotates the session key. | none |
GET | /v1/apps/{name}/csrf | viewer | Returns CSRF protection settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/csrf | operator | Changes CSRF protection settings. | Body: set (key to value; empty string resets the key), base_version (required), comment, dry_run. |
GET | /v1/apps/{name}/csrf/keys | viewer | Returns the CSRF key status (not the keys). | none |
POST | /v1/apps/{name}/csrf/keys/rotate | operator | Rotates the CSRF key. | none |
GET | /v1/apps/{name}/cors | viewer | Returns CORS settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/cors | operator | Changes 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} | viewer | Returns one CORS list. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/cors/lists/{list} | operator | Replaces one CORS list. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
POST | /v1/apps/{name}/cors/test | viewer | Shows 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
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/dlp | viewer | Returns data leak masking settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/dlp | operator | Changes 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} | viewer | Returns one masking list. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/dlp/lists/{list} | operator | Replaces one masking list. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
POST | /v1/apps/{name}/dlp/test | viewer | Runs sample text through the masking rules. | Body: text. Response: rule, action, count, masked. |
GET | /v1/apps/{name}/files | viewer | Returns file upload settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/files | operator | Changes 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} | viewer | Returns one file list. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/files/lists/{list} | operator | Replaces one file list. | Body: items (the whole list; [] removes it), base_version, comment, dry_run. |
POST | /v1/apps/{name}/files/test | viewer | Shows how a described upload is treated. | Body: path, name, content_type, data. Response: rule, action. |
Virtual patches
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/vpatch | viewer | Lists imported scanner reports and applied patches. | none |
POST | /v1/apps/{name}/vpatch/reports | operator | Imports a scanner report. | Body: name, data, base_version. |
GET | /v1/apps/{name}/vpatch/reports/{id} | viewer | Returns one imported report with its findings. | none |
DELETE | /v1/apps/{name}/vpatch/reports/{id} | operator | Deletes an imported report. | none |
POST | /v1/apps/{name}/vpatch/apply | operator | Creates virtual patches from chosen findings. | Body: report, findings, ids, base_version, comment, dry_run. |
POST | /v1/apps/{name}/vpatch/remove | operator | Removes virtual patches. | Body: ids, base_version, comment, dry_run. |
Client-side scripts
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/apps/{name}/scripts Since v0.2 | viewer | Lists scripts the application's pages load. | none |
GET | /v1/apps/{name}/scripts/history Since v0.2 | viewer | Shows when scripts changed. | none |
GET | /v1/apps/{name}/scripts/settings Since v0.2 | viewer | Returns script watch settings. | Returns the current values with base_version. |
PUT | /v1/apps/{name}/scripts/settings Since v0.2 | operator | Changes 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.2 | operator | Checks the application's scripts now. | none |
POST | /v1/apps/{name}/scripts/confirm Since v0.2 | operator | Confirms 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