API Access
Everything you do in the console — reading/updating configuration, managing rules, blocking IPs, purging the cache, usage reports — can also be done programmatically through the HEIMWALL REST API. It is designed for CI/CD pipelines, monitoring systems and your own dashboards.
Accessing the detailed API documentation
Section titled “Accessing the detailed API documentation”-
Sign in to the console at https://cloud.heimwall.net/.
-
Open Console → WAF → [domain] → API Keys.
-
Click the “Open API Documentation” link on the page. The API Documentation viewer opens inside the panel: all endpoints, parameters, request/response schemas and error codes are documented there. You can also download the machine-readable spec via the “Raw spec (OpenAPI)” link.
For reseller accounts, the same documentation opens from the API Documentation link under Reseller Panel → Integrations.
Creating an API key
Section titled “Creating an API key”-
Create a new key on Console → WAF → [domain] → API Keys.
-
Give the key a name and tick the scopes it needs — each key can only perform the operations you select.
-
Optionally add an IP restriction (the key only works from the IPs/CIDRs you specify) and set an expiry date.
-
The generated key is shown only once — copy it immediately and store it in your password manager or secrets vault. Keys are stored server-side as irreversible hashes; if you lose one, revoke it and create a new one.
A domain can have at most 20 active keys. You can revoke keys and update their name and scopes from the same page.
Scopes
Section titled “Scopes”Following the principle of least privilege, each key should get only the scopes it needs:
| Scope | What it allows |
|---|---|
config:read | Reading configuration, rules and protection settings |
config:write | Configuration and rule changes, IP blocking |
usage:read | Reading traffic and usage data |
cache:purge | Purging the cache |
Security and usage notes
Section titled “Security and usage notes”- Authentication uses a Bearer token; you send your key in the
Authorizationheader. The exact format is shown in the in-panel documentation. - Rate limiting applies; track your remaining quota via the
X-RateLimit-LimitandX-RateLimit-Remainingresponse headers. Exceeding the limit returns429withRetry-After. - Audit trail: every change made through the API is recorded in the Audit Log under the key’s name — who changed what, and when, is always traceable.
- Rotate keys periodically: create a new one, migrate your systems, revoke the old one.
- Never put a key in client-side code, a repository or logs.