REST API & OpenAPI reference¶
Danbyte exposes its full IPAM/DCIM data model as a REST API under /api/, with
an interactive, self-describing OpenAPI 3 reference built in.
Where it lives¶
| URL | What it is |
|---|---|
/api/ |
Redirects to the docs below. |
/api/docs/ |
Swagger UI — interactive reference with "try it out" against your live tenant. |
/api/docs/redoc/ |
ReDoc — a clean, readable reference view. |
/api/schema/ |
The raw OpenAPI 3 schema (YAML) — the machine-readable source of truth. |
All four require authentication (session cookie or an API token), consistent with the rest of the API's default-closed posture.
The reference is generated by drf-spectacular from the actual viewsets, serializers, and view annotations, so it never drifts from the running code. Its assets are bundled locally (drf-spectacular-sidecar), so the interactive docs work on airgapped installs with no CDN access.
Authenticating¶
- API token — create one under Settings → Preferences → API tokens, then
send it as a header:
Authorization: Token <key>. In Swagger UI, click Authorize and paste the token. Tokens are scoped to a tenant. - Session — when you are logged into the SPA, the same session cookie authorizes API calls from the browser.
Every request is scoped to your active tenant and enforced by RBAC — the schema describes the shape of each endpoint, but access is always checked server-side.
Grouping¶
Operations are grouped by domain object (Prefixes, IP addresses, Devices, VLANs,
Circuits, Monitoring, …) so you can find an endpoint by the thing it acts on.
The CRUD object endpoints come from the router-registered viewsets; the
remaining operational endpoints (monitoring, compliance, import/export, system,
settings, …) are annotated with @extend_schema so they appear with proper
summaries, request bodies, and responses.
Generating the schema offline¶
To export the schema to a file (for client generation, diffing, or CI):