API Specifications
This application exposes a REST API built with Django REST Framework (DRF) and documented interactively with DRF-Spectacular.
Base URL
All API endpoints live under /api/v1/.
Resources & endpoints
| Resource | Endpoint | Operations |
|---|---|---|
| Sites | /api/v1/sites/ |
list, create, retrieve, update, delete |
| Devices | /api/v1/devices/ |
list, create, retrieve, update, delete |
| Interfaces | /api/v1/interfaces/ |
list, create, retrieve, update, delete |
| Connections | /api/v1/connections/ |
list, create, retrieve, update, delete |
| Traced connections | /api/v1/connections/traced/ |
list all connections touching a site, device, or interface. Query parameters: type (site / device / interface)
and id (primary key).
|
url field — a direct link to its detail page in the DRF browsable
API. Click any url value in the response to navigate to that record.
Browse traced connections
Use the form below to open the traced-connections endpoint directly in your browser. You must be logged in (session cookie) for the request to succeed.
Authentication
The API uses Django session authentication. Log in via the Admin interface (or any standard Django login view) to obtain a session cookie, then include that cookie in subsequent API requests.
Read operations (GET) are available to any authenticated user. Write operations (POST, PUT, PATCH, DELETE) are restricted to superusers only.
Interactive documentation
Two interactive API browsers are available. Both let you authenticate with your session cookie and make live requests directly from the browser.
- Swagger UI — explore and try all endpoints via a rich interactive interface.
- ReDoc — a clean, read-focused reference view of the full API schema.
- OpenAPI schema (YAML) — raw machine-readable schema for use with code generators or API clients.
How to use Swagger UI
- Log in to the Admin interface in another browser tab so your session cookie is set.
- Open Swagger UI.
- Click Authorize, then tick sessionAuth and click Authorize.
- Expand any endpoint, click Try it out, fill in any required fields, and click Execute.
403 Forbidden (CSRF Failed) response.
To work around this, copy the value of the csrftoken cookie from your browser's
developer tools and add it manually as an X-CSRFToken request header inside
Swagger UI's Request headers field before executing.
Read operations (GET) are not affected.