Skip to content

Complete API Reference

All 20 API endpoints with their methods, permissions, and descriptions.

EndpointMethodsPermissionDescription
/api/access/roleGETAll authenticatedReturns caller’s role, permissions, assigned sites, first/last name, onboarded status
/api/accessGET, POSTpage:access (admin)User/role/team CRUD. GET actions: me, users, roles, teams, team-requests. POST actions: upsert-user, delete-user, upsert-role, approve-team-request, deny-team-request
/api/onboardingGET, POSTAll authenticatedGET: onboarding status + teams. POST: submit first/last name + optional team request
/api/setupGET, POSTpage:setup (admin)Database migration system (v1–v10). GET: current version. POST: run pending migrations
/api/sitesGETAll authenticatedList active sites filtered by user’s team/role assignments
/api/configGETVaries by typeApp configuration (links, infrastructure info). ?type=links = all, ?type=infra = admin only
/api/dashboard-configGET, POSTAll authenticatedPer-user dashboard widget layout (profile-based)
/api/logsGET, POSTpage:logs / AllActivity logging. GET: view logs (admin). POST: write log entry (all)
EndpointMethodsPermissionDescription
/api/operationsGETpage:operationsTUGA RPi proxy. ?endpoint=status|alerts|events|occupancy|stats & &rpi=rpi1|all
/api/api-healthGETpage:api-healthComprehensive health check (17+ endpoints: tunnels, doors, back offices, Azure, UniFi)
/api/unifiGETpage:networkUniFi Cloud API proxy (devices, clients, traffic stats)
/api/trigger-settingsGET, POSTpage:trigger-settingsConfigurable alert thresholds with severity levels (critical/warning/info)
/api/trigger-alertsGETAll authenticatedActive alerts evaluated by cron worker against trigger settings
/api/historyGETpage:monHistorical snapshots and alert history from cron worker
/api/secretsGETAdmin onlyRetrieve stored credentials (SSH passwords, service tokens)
EndpointMethodsPermissionDescription
/api/langflowPOSTpage:aiProxy to Langflow AI agent. Input: { input_value }. Saves response to D1
/api/messagesGET, POST, DELETEpage:aiAI conversation persistence. Per-user message history in D1
EndpointMethodsPermissionDescription
/api/receipt-api/logsGET, POSTGET: admin. POST: X-Api-KeyReceipt processing metrics. POST from Azure (real-time push)
/api/receipt-api/statsGETpage:operationsAggregated receipt analytics (success rate, latency, error breakdown)