Skip to content

API Reference

All endpoints require authentication via JWT cookie except /api/health, /api/auth/login, and /api/auth/setup.

Data Model


Authentication

MethodEndpointDescription
POST/api/auth/loginLog in and receive JWT cookie
POST/api/auth/logoutLog out and clear JWT cookie
GET/api/auth/meGet current authenticated user
POST/api/auth/setupInitial admin account setup

Switches

MethodEndpointDescription
GET/api/switchesList all switches
POST/api/switchesCreate a new switch
GET/api/switches/:idGet switch by ID
PUT/api/switches/:idUpdate switch by ID
DELETE/api/switches/:idDelete switch by ID
POST/api/switches/:id/duplicateDuplicate a switch
PUT/api/switches/sortUpdate switch sort order

Switch Ports

MethodEndpointDescription
PUT/api/switches/:id/ports/:portIdUpdate a switch port
DELETE/api/switches/:id/ports/:portIdDelete a switch port
PUT/api/switches/:id/ports/bulkBulk update switch ports

Switch LAG Groups

MethodEndpointDescription
GET/api/switches/:id/lag-groupsList LAG groups for a switch
POST/api/switches/:id/lag-groupsCreate a LAG group
GET/api/switches/:id/lag-groups/:idGet LAG group by ID
PUT/api/switches/:id/lag-groups/:idUpdate LAG group by ID
DELETE/api/switches/:id/lag-groups/:idDelete LAG group by ID

VLANs

MethodEndpointDescription
GET/api/vlansList all VLANs
POST/api/vlansCreate a new VLAN
GET/api/vlans/:idGet VLAN by ID
PUT/api/vlans/:idUpdate VLAN by ID
DELETE/api/vlans/:idDelete VLAN by ID
GET/api/vlans/:id/referencesGet objects referencing this VLAN
GET/api/vlans/suggest-colorSuggest a color for a new VLAN

Subnets

TIP

The UI calls this entity Subnets since v0.20.0. The API paths stay /api/networks for backward compatibility.

MethodEndpointDescription
GET/api/networksList all subnets
POST/api/networksCreate a new subnet
GET/api/networks/:idGet subnet by ID
PUT/api/networks/:idUpdate subnet by ID
DELETE/api/networks/:idDelete subnet by ID
GET/api/networks/:id/referencesGet objects referencing this subnet
GET/api/networks/:id/utilizationGet subnet IP utilization stats

Subnet IP Allocations

MethodEndpointDescription
GET/api/networks/:id/allocationsList allocations for a subnet
POST/api/networks/:id/allocationsCreate an IP allocation
GET/api/networks/:id/allocations/:allocIdGet allocation by ID
PUT/api/networks/:id/allocations/:allocIdUpdate allocation by ID
DELETE/api/networks/:id/allocations/:allocIdDelete allocation by ID

Subnet IP Ranges

MethodEndpointDescription
GET/api/networks/:id/rangesList IP ranges for a subnet
POST/api/networks/:id/rangesCreate an IP range
GET/api/networks/:id/ranges/:rangeIdGet IP range by ID
PUT/api/networks/:id/ranges/:rangeIdUpdate IP range by ID
DELETE/api/networks/:id/ranges/:rangeIdDelete IP range by ID

Layout Templates

MethodEndpointDescription
GET/api/layout-templatesList all layout templates
POST/api/layout-templatesCreate a layout template
GET/api/layout-templates/:idGet layout template by ID
PUT/api/layout-templates/:idUpdate layout template by ID
DELETE/api/layout-templates/:idDelete layout template by ID
POST/api/layout-templates/:id/duplicateDuplicate a layout template
GET/api/layout-templates/:id/exportExport a layout template as file
POST/api/layout-templates/importImport a layout template from file

Users

MethodEndpointDescription
GET/api/usersList all users
POST/api/usersCreate a new user
GET/api/users/:idGet user by ID
PUT/api/users/:idUpdate user by ID
DELETE/api/users/:idDelete user by ID
PUT/api/users/:id/passwordChange user password

Settings

MethodEndpointDescription
GET/api/settingsGet application settings
PUT/api/settingsUpdate application settings

Dashboard & Tools

MethodEndpointDescription
GET/api/healthHealth check endpoint (no auth)
GET/api/dashboard/statsGet dashboard statistics
GET/api/searchGlobal search across all entities
GET/api/subnet-calculatorCalculate subnet details from CIDR

Topology

MethodEndpointDescription
GET/api/sites/:siteId/topologyGet topology data (nodes, links, ghost nodes) for a site
GET/api/sites/:siteId/topology-layoutGet saved node positions for a site
PUT/api/sites/:siteId/topology-layoutSave node positions
DELETE/api/sites/:siteId/topology-layoutReset saved layout

Data Management

MethodEndpointDescription
GET/api/backup/exportFull DB dump as a JSON payload (schema: "sqlite-v1").
POST/api/backup/import501 in 0.21.x — being reworked for SQLite, see #156.
GET/api/data/exportAlias of /api/backup/export.
POST/api/data/import501 in 0.21.x — see #156.
GET/api/data/templateDownload blank data template.
GET/api/export/:entityExport a single entity table as JSON or CSV.
POST/api/import/:entity501 in 0.21.x — see #156.
GET/api/import/template/:entityDownload CSV template for entity.

Backup-export payload

json
{
  "version": "0.21.0",
  "created_at": "2026-06-03T20:34:46.634Z",
  "schema": "sqlite-v1",
  "data": {
    "users": [...],
    "switches": [...],
    "ports": [...],
    "vlans": [...],
    "networks": [...],
    "ipAllocations": [...],
    "ipRanges": [...],
    "layoutTemplates": [...],
    "lagGroups": [...],
    "activity": [...],
    "settings": [...],
    "publicTokens": [...],
    "topologyLayouts": [...]
  }
}

Field shapes mirror the SQLite columns. JSON-column fields (tags, configured_vlans, port tagged_vlans, layout units, activity changes/previous_state/metadata, network dns_servers, topology node_positions) ship as JSON strings — the restore path parses them back on the way in.

Activity

MethodEndpointDescription
GET/api/activityList recent activity log entries.
POST/api/activity/:id/undo501 in 0.21.x — being reworked for SQLite, see #156.

Released under the GPL-3.0 License.