Appearance
Management API Since v0.1
The management API is the HTTP interface behind the web console and the waap commands. You use it to read and change configuration, read events, and manage accounts from scripts. Every route is listed in the area pages below.
Base URL and listener
The API is served over HTTPS on the management listener, together with the web console. It is never served on a data-plane listener.
| Item | Value |
|---|---|
| Address | 127.0.0.1:9443. Change it with the node option -mgmt-addr. An empty value disables the listener. |
| Base URL in the examples | https://127.0.0.1:PORT/v1 (replace PORT). |
| Certificate | A self-signed certificate created in the data directory, unless you pass -mgmt-cert and -mgmt-key. GET /v1/management returns its SHA-256 fingerprint. |
| Who may connect | Only sources in management.trusted_networks (empty: loopback only). Other connections are closed. |
Examples use -k because of the default self-signed certificate. With your own certificate, use --cacert instead. For the options, see Server commands.
Authentication
Send one of two credentials. Without one, a route answers 401.
| Credential | How you send it | CSRF token |
|---|---|---|
| API token | Header Authorization: Bearer waap_.... An administrator creates tokens with POST /v1/tokens; the secret is shown once. A token has a role, optional applications and an optional expiry. | Not needed. |
| Sign-in session | POST /v1/auth/login sets the cookie waap_session (HTTP-only, secure, same-site strict). | Needed on every request that is not GET, HEAD or OPTIONS: send the csrf_token from the login response (or GET /v1/auth/session) in the header X-CSRF-Token. A missing or wrong value answers 403. |
Use a token for scripts and the session for the console. A session ends after 15 minutes without a request or 12 hours in total. Five failed sign-ins within 15 minutes refuse further attempts from that account or source until the 15 minutes have passed.
The /v1/api-keys routes manage consumer keys for protected applications. They are not management credentials. For details, see API protection API.
Roles
Each route has a minimum role. Roles are viewer, operator and admin, each including the one before.
| Role | What it can do on the API |
|---|---|
viewer | Read configuration, events, traffic and status. Request values are shown masked as under mask: pci (credentials, cookies, tokens, card numbers and fields marked sensitive); other values are shown in full. |
operator | Everything a viewer can, plus change configuration, rotate keys and run tests that change state. |
admin | Everything, including accounts, tokens, SIEM, ICAP, backup, assessments and the management, ha, analyst, assess and scan_targets sections. |
A token or account can be limited to some applications. A limited caller sees and changes only those applications, and gets 404 for others. Routes marked all applications in the Minimum role column also refuse a limited caller with 403. For the role model, see Accounts and roles.
Request and response format
- Bodies are JSON (
Content-Type: application/json). A request body of a configuration change is limited to 4 MiB plus 64 KiB. - Changes that create a configuration version take
base_version, the version you read. If another version became active since, the call answers409. They also takecommentanddry_run(validate and return the changes without saving). ADELETEof such an object takesbase_versionas a query parameter. - Durations use Go syntax (
90s,1h). - Responses are JSON unless a route exports a file (
events/export,traffic/export,backup) or a stream (events/stream).
Errors
A failed call returns a status code and a JSON object with one key.
json
{"error": "requires the operator role"}| Status | Meaning |
|---|---|
400 | The request could not be read or a parameter is wrong. |
401 | No valid credential. |
403 | The role is too low, the caller is limited to other applications, or the CSRF token is missing. |
404 | The object does not exist, is outside the caller's applications, or this process does not store it. |
409 | base_version is stale, or the object is not in a state that allows the call. On a standby node, a call that changes state answers 409 with the active node's management address in active. |
422 | The change was understood but failed validation. The message names the key. |
503 | The part that serves the route is not running on this process. |
Filters, limits and paging
- List routes for events, traffic, audit and versions take
limit. Events default to 100 and allow at most 1000. sinceanduntilaccept an RFC 3339 time or a duration back from now, such as1h. The audit log accepts a duration only.GET /v1/eventsandGET /v1/trafficacceptq, a filter written in the analytics query language. For its fields, see Event and log fields.- There is no page number.
GET /v1/trafficandGET /v1/analyst/conversationstakebeforeto continue from the last item of the previous call.
Versioning
All routes are under /v1. GET /v1/openapi.yaml returns the machine-readable description of the same routes. A change that breaks existing callers would use a new prefix.
Routes by area
| Page | Covers |
|---|---|
| Applications and configuration | Versions, apply, applications, pools, virtual IPs, certificates, global settings. |
| Events and traffic log | Events, groups, stream, export, exceptions, traffic records. |
| Access, bans and lists | Bans, lists, rate-limit suggestions, identity, file lists, ICAP servers. |
| Bot mitigation | Bot settings, lists, challenge keys, CAPTCHA, clients, catalog. |
| API protection | Schemas, gRPC, XML, keys, attestation, ownership, flows, volume, LLM, SSRF, MCP. |
| Response, session and data protection | Headers, cookies, sessions, CSRF, CORS, data leak masking, files, virtual patches, scripts. |
| Learning and positive model | Positive model, learned model, suggestions, learned schemas. |
| Security testing | Scan targets, assessments, issues, validation campaigns, proving a fix. |
| Analytics and dashboards | Queries, saved filters, dashboards. |
| Analyst | Questions, explanations, summaries, conversations, digests, providers. |
| High availability | Pair status, switchover, maintenance, join tokens, diverged versions. |
| Accounts and audit | Sign-in, tokens, accounts, audit log. |
| System | Status, product information, management listener, SIEM, backup. |