WESERGATE NAC / REFERENCE

API usage and authentication guide

Core conventions The administrative backend is FastAPI. Routes are grouped under /api , with separate trusted service endpoints under /api/internal/radius . Use HTTPS. Do not use the browser session cookie as a long-live

v0.14.3Pre-production · v0.14.3
v0.14.3 documentation draft: technical, legal and commercial reviews are still pending.

Core conventions

The administrative backend is FastAPI. Routes are grouped under /api, with separate trusted service endpoints under /api/internal/radius. Use HTTPS. Do not use the browser session cookie as a long-lived machine integration credential.

Authenticate

POST /api/auth/login with username/password and TOTP if enabled. Response provides a session cookie and CSRF token. For browser API mutations, send X-CSRF-Token; retrieve a refreshed token from GET /api/auth/csrf after reload. Read-only routes require the corresponding permissions.

Example (illustrative only)

POST /api/auth/login HTTP/1.1
Content-Type: application/json

{"username":"admin","password":"YOUR_SECRET"}
GET /api/license/status HTTP/1.1
Cookie: wg_session=<session-cookie>
POST /api/license/activate HTTP/1.1
Content-Type: application/json
Cookie: wg_session=<session-cookie>
X-CSRF-Token: <csrf-value>

{"document":{"payload":{},"signature":"..."}}

The last shape demonstrates the envelope only; a real license must be correctly signed by the vendor. Never copy secrets into public scripts or documentation.

Common errors

401 unauthenticated, 403 insufficient permissions/CSRF, 402 expired trial/license on most mutations, 409 state conflict, 422 schema validation, 429 throttling.

Full route-by-route catalog

See /wesergate/docs/api and the machine-readable data/api-endpoints.json, extracted from the v0.13 source. Some requests require Pydantic body schemas; the catalog names handler and body model rather than inventing response payloads.

New in v0.13.0

Original English reference: en/docs/reference/api-guide.mdRead documentation
Pre-production · v0.14.3

Not a certified production NAC. Physical switch/RADIUS enforcement and 1,000-device traffic remain unverified.

WeserCode One now provides customer accounts, support tickets and verified commercial records. Automated checkout and signed WeserGate license issuance are not connected.

Open customer portal Product overview