All examples are illustrative. Use HTTPS, a browser-authenticated session and session CSRF token. Substitute values from your own authorized test site. Do not paste passwords or secrets into shared scripts, tickets or documentation. /api/internal/radius/* is a trusted-service-only interface and should not be called directly from a browser.
1. Read the license status
GET /api/license/status
Cookie: wg_session=<session-cookie>
Response includes installation ID, status, days remaining, trial dates, plan options and paid-license expiration where applicable.
2. Activate a vendor-signed paid license
POST /api/license/activate
Content-Type: application/json
X-CSRF-Token: <session-csrf>
Cookie: wg_session=<session-cookie>
{"document":{"payload":{"schema":1,"product":"wesergate-nac","plan":"annual","license_id":"<uuid>","installation_id":"<uuid>","customer":"Example Company","issued_at":"<UTC>","not_before":"<UTC>","expires_at":"<UTC>"},"signature":"<vendor-signature>"}}
Important: Fake values or a hand-edited signature will be rejected. The supplier issues a complete signed document offline.
3. Read the dashboard and select widgets
GET /api/dashboard/widgets
GET /api/dashboard/charts
GET /api/summary
PUT /api/dashboard/refresh
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"seconds":30}
Only 0,5,10,15,30,60,120,300 are supported. Every refresh invokes read-only dashboard endpoints, not a physical switch scan.
4. Register a manual device
POST /api/devices/manual
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"mac":"AA:BB:CC:11:22:33","hostname":"pilot-printer","ip":"10.40.50.22","category":"Printer","access_status":"unreviewed"}
This creates an unobserved inventory record and does not place a device on a VLAN.
5. Register a person in the local inventory
POST /api/users
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"username":"pilot.user","display_name":"Pilot User","email":"pilot@example.invalid","department":"Test","access_status":"unreviewed"}
A local inventory identity is not an AD-verified login.
6. Create and simulate an access policy
POST /api/policies/simulate
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"context":{"method":"EAP-TLS","category":"Windows computer"},"simulate_authenticated":false}
The simulator never sends CoA or configures a port. For authoring use POST /api/policies with PolicyWrite (see request schema catalog) and an explicit review/publish flow.
7. Register an Aruba switch
POST /api/switches
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"name":"pilot-aruba","ip":"10.40.10.20","platform":"aruba_os_switch"}
Select SNMPv3/SNMPv2c/SSH connection in the separate transport settings endpoint, with secrets stored through the application. Then issue a guarded read-only discovery operation and compare returned ports to the real switch.
8. Group management
POST /api/groups
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"kind":"device","name":"Pilot printers","description":"Known printers in the isolated lab","external_identity":""}
Group membership is not network authorization. Rules and policy-linking endpoints have separate permission and trust requirements.
9. Guest registration
POST /api/guests
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{"name":"Test Guest","email":"guest@example.invalid","sponsor":"pilot.sponsor","mac":null,"expires_at":"2026-12-01T12:00:00Z"}
Guest approval is a database/workflow event, not proof that the switch authorized a session.
10. Run readiness checks
POST /api/setup/checks/run
Content-Type: application/json
X-CSRF-Token: <session-csrf>
{}
Results distinguish pass, review and fail. They explicitly do not certify real RADIUS EAP and VLAN enforcement.
11. Health and audit
GET /api/health/live
GET /api/health/ready
GET /api/audit
GET /api/audit/verify
Health may be public for local monitoring; audit needs RBAC. Do not expose internal management endpoints on the quarantine interface.
12. Error recovery
401: reauthenticate and receive a new session.403: check CSRF, origin, session and role; never disable defenses as a workaround.402: sign in as license manager and activate a valid signed file.409: inspect the resource state before retrying.422: verify field types inrequest-schemas.md.429: use bounded retries with backoff.5xx: inspect sanitized container/service logs.
For every other route, see the 139-entry source-derived API catalog, request schema index, permission matrix and internal function reference. Do not infer supported network behavior solely from an HTTP endpoint existing.
en/docs/reference/api-examples.mdRead documentation Not a certified production NAC. Physical switch/RADIUS enforcement and 1,000-device traffic remain unverified.

