Skip to content

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.

ItemValue
Address127.0.0.1:9443. Change it with the node option -mgmt-addr. An empty value disables the listener.
Base URL in the exampleshttps://127.0.0.1:PORT/v1 (replace PORT).
CertificateA 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 connectOnly 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.

CredentialHow you send itCSRF token
API tokenHeader 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 sessionPOST /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.

RoleWhat it can do on the API
viewerRead 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.
operatorEverything a viewer can, plus change configuration, rotate keys and run tests that change state.
adminEverything, 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 answers 409. They also take comment and dry_run (validate and return the changes without saving). A DELETE of such an object takes base_version as 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"}
StatusMeaning
400The request could not be read or a parameter is wrong.
401No valid credential.
403The role is too low, the caller is limited to other applications, or the CSRF token is missing.
404The object does not exist, is outside the caller's applications, or this process does not store it.
409base_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.
422The change was understood but failed validation. The message names the key.
503The 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.
  • since and until accept an RFC 3339 time or a duration back from now, such as 1h. The audit log accepts a duration only.
  • GET /v1/events and GET /v1/traffic accept q, a filter written in the analytics query language. For its fields, see Event and log fields.
  • There is no page number. GET /v1/traffic and GET /v1/analyst/conversations take before to 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 ​

PageCovers
Applications and configurationVersions, apply, applications, pools, virtual IPs, certificates, global settings.
Events and traffic logEvents, groups, stream, export, exceptions, traffic records.
Access, bans and listsBans, lists, rate-limit suggestions, identity, file lists, ICAP servers.
Bot mitigationBot settings, lists, challenge keys, CAPTCHA, clients, catalog.
API protectionSchemas, gRPC, XML, keys, attestation, ownership, flows, volume, LLM, SSRF, MCP.
Response, session and data protectionHeaders, cookies, sessions, CSRF, CORS, data leak masking, files, virtual patches, scripts.
Learning and positive modelPositive model, learned model, suggestions, learned schemas.
Security testingScan targets, assessments, issues, validation campaigns, proving a fix.
Analytics and dashboardsQueries, saved filters, dashboards.
AnalystQuestions, explanations, summaries, conversations, digests, providers.
High availabilityPair status, switchover, maintenance, join tokens, diverged versions.
Accounts and auditSign-in, tokens, accounts, audit log.
SystemStatus, product information, management listener, SIEM, backup.