PortWall API reference

The documented PortWall management API: where it answers, how to authenticate with an API key, the roles, how errors and background changes work, what PortWall promises about compatibility, and a page per area.

What this covers

This is the documented part of PortWall's management API: the endpoints PortWall supports for your scripts and integrations. For worked examples of common tasks, start with Using the PortWall API. The same description is available as an OpenAPI file for your own tools: openapi.json.

The console uses more endpoints than are documented here. Those are the console's own and can change in any release; build only on what this reference lists.

Where it answers

  • On Windows, only on the server itself: http://127.0.0.1:5000. Run scripts on the PortWall server.
  • On the Linux appliance, on the appliance itself at the same address, and from other machines at https://<appliance address>:9443, with the console's certificate.

Every path in this reference follows that address, for example http://127.0.0.1:5000/api/blocks.

Authentication and roles

Send an API key in the X-Api-Key header. Create keys on the console's API Keys page, or with the API keys endpoints. Each endpoint says which key it needs:

Role Can do
Viewer Read everything; change nothing.
Admin Everything, including changes, blocks and the configuration.
Tenant Only the tenant API, and only for that tenant's sites.

A missing, wrong or revoked key answers 401. A key whose role cannot do this answers 403.

Requests and replies

  • Request and reply bodies are JSON. Field names are camelCase.
  • Lists of choices are sent and returned as text, for example "mode": "DetectionOnly".
  • Times are ISO 8601 with a time zone, for example 2026-10-27T09:14:00+00:00.
  • A request the caller can fix answers 400 or 409 with { "error": "..." } saying what is wrong (the tenant API's settings changes answer with { "errors": [ ... ] }). A 403 or 404 carries the same error only where its endpoint shows one; most 404s have no body. How to read the reply in PowerShell is in Using the PortWall API.

Changes that apply in the background

Many changes are saved at once and put in force in the background. Their reply carries applying: true and a number, applySeq. The change is in force when GET /api/config-apply/status shows completed at or above that number; outcome then says applied, deferred (saved, taken up as soon as the engine can) or failed.

Compatibility

  • A documented endpoint may gain fields, optional parameters and new values in any release. Write clients that ignore fields they do not know.
  • Removing or renaming a documented endpoint or field, or changing what it means, is announced in the release notes and done no sooner than 60 days later.

The areas

Area What it covers
Status and licence Is it answering, is protection enforcing, the licence, waiting for changes
Sites Sites, their modes and settings, revisions and rollback
Virtual patches A site's own virtual patches
Outbound control What a site's application may connect out to
Blocking Blocking and unblocking addresses
Allowlist Addresses that are never blocked
Attacks Recorded attacks, campaigns and the audit log
Threat-intelligence feeds The feeds and their actions
Geo-blocking Country policies
Brute-force protection Login protection settings
Bot protection The browser check and bot actions
Notifications Alerts and where they go
Backup Download and restore the configuration
API keys Creating and revoking keys
Tenants For hosting providers: owners, grants and the tenant policy
Tenant API What a Tenant key can do on its own sites
Data types Every object, field by field
Updated 2026-10-27Something unclear or missing? Tell us.