Skip to content

HTTP Routes

All HTTP routes are defined in server/src/routes/http.ts. The route handler is a large function that returns route definitions consumed by the Bun HTTP server.

Route Groups

Authentication

MethodPathAuthDescription
GET/.well-known/jwks.jsonNonePublic JWKS endpoint for JWT verification
POST/loginNoneAuthenticate with email/password, returns JWT
POST/registerAdminCreate a new user
POST/change-passwordAuthChange current user's password

Users

MethodPathAuthDescription
GET/usersAdminList all users
DELETE/users/:userIdAdminDelete a user

Beacons

MethodPathAuthDescription
GET/beaconsAuthList all beacons
POST/beaconsAdminCreate a beacon
GET/beacon/:idAuthGet beacon details
PUT/beacon/:idAdminUpdate a beacon
DELETE/beacon/:idAdminDelete a beacon
GET/beacon/:mac/infoAuthGet beacon info by MAC address
GET/beacon/:id/intervalsAuthGet tracking intervals for a beacon

Gateways

MethodPathAuthDescription
GET/gatewaysAuthList all gateways
POST/gatewaysAdminCreate a gateway
GET/gateway/:idAuthGet gateway details
PUT/gateway/:idAdminUpdate a gateway
DELETE/gateway/:idAdminDelete a gateway

Locations

MethodPathAuthDescription
GET/locationsAuthList all locations
POST/locationsAdminCreate a location
PUT/locations/:idAdminUpdate a location
DELETE/locations/:idAdminDelete a location

Maps

MethodPathAuthDescription
GET/mapsAuthList all maps
POST/maps/uploadAdminUpload a new map image
GET/map/:idAuthGet map details
PUT/map/:idAdminUpdate map metadata
DELETE/map/:idAdminDelete a map
GET/maps/imageAuthGet map image file
GET/maps/:id/zonesAuthGet zones for a map
GET/maps/:id/gatewaysAuthGet gateways for a map
POST/maps/:idAdminSave zones and gateway positions
GET/maps/overviewAuthGet map overview data

Events & Logs

MethodPathAuthDescription
GET/eventsAuthList beacon events
GET/events/exportAdminExport events as CSV
GET/logsAuthList system logs

Tracking

MethodPathAuthDescription
POST/tracking/start/:algAdminStart tracking with algorithm
POST/tracking/stopAdminStop tracking
GET/tracking/statusAuthGet tracking status
GET/tracking/algorithmsAuthList available algorithms
GET/tracking/:idAuthGet tracking data for a beacon

Floors (Navigation)

MethodPathAuthDescription
GET/floorsAuthList all floors
POST/floorsAdminCreate a floor
GET/floor/:idAuthGet floor details
PUT/floor/:idAdminUpdate a floor
DELETE/floor/:idAdminDelete a floor
GET/floor/:id/nodesAuthGet nodes for a floor
GET/floor/:id/edgesAuthGet edges for a floor
GET/floor/:id/graphAuthGet full navigation graph for a floor
POST/floor/:id/graphAdminSave navigation graph for a floor

Nodes & Edges

MethodPathAuthDescription
PUT/node/:idAdminUpdate a node
DELETE/node/:idAdminDelete a node
PUT/edge/:idAdminUpdate an edge
DELETE/edge/:idAdminDelete an edge
MethodPathAuthDescription
GET/navigation/tokensAdminList navigation tokens
POST/navigation/tokensAdminCreate a navigation token
DELETE/navigation/token/:idAdminDelete a navigation token
GET/navigation/project/:idToken/AuthGet navigation bundle for a location
POST/navigation/pathfindToken/AuthFind shortest path between nodes
GET/navigation/floor/:id/mapToken/AuthGet floor map image

LLD (Zabbix Low-Level Discovery)

MethodPathAuthDescription
GET/lld/beaconsNoneLLD data for beacons
GET/lld/gatewaysNoneLLD data for gateways

Import

MethodPathAuthDescription
POST/import/beaconsAdminBulk import beacons
POST/import/gatewaysAdminBulk import gateways

Status & Version

MethodPathAuthDescription
GET/versionNoneServer version and build info
GET/status/kissAuthKISS service status
GET/status/mqttAuthMQTT connection status

Deploy

MethodPathAuthDescription
POST/deployNoneDeployment webhook (e.g. GitHub)

Static Files

MethodPathDescription
GET/Web UI index page
GET/index.htmlWeb UI index page
GET/css/:filenameCSS files
GET/js/:filenameJavaScript files
GET/images/:filenameImage files
GET/webfonts/:filenameWeb font files

Auth Levels

  • None: No authentication required
  • Auth: Valid JWT required (any user)
  • Admin: Valid JWT with admin role required
  • Token/Auth: Either a navigation token or JWT auth