Documentation

API Reference

Core ServOS REST and WebSocket routes

API Reference

ServOS exposes its control-plane API under /api/v1. Use your own ServOS origin, for example https://servos.example.com/api/v1.

Authentication

Authenticated routes accept the session established by the login flow. Agents use their issued agent credentials. Public bootstrap routes are explicitly called out below; do not assume an unlisted route is public.

Public and authentication routes

MethodRoutePurpose
GET/healthProcess health check (outside /api/v1)
GET/api/v1/health/init-statusInitial-setup status
POST/api/v1/setup-handshakeFirst-run setup handshake
POST/api/v1/auth/loginStandalone login
POST/api/v1/auth/logoutEnd the current session
POST/api/v1/auth/forgot-passwordStart password recovery
POST/api/v1/auth/reset-passwordComplete password recovery

Core resources

All routes below are relative to /api/v1 and require authentication.

MethodRoutePurpose
GET, POST/organizationsList or create organizations
GET, PUT, PATCH, DELETE/organizations/{id}Manage an organization
GET, POST/serversList or create servers
GET, PUT, DELETE/servers/{id}Manage a server
POST/servers/{id}/commissionCommission a server
GET/servers/{id}/statusRead server status
GET/servers/{id}/preflightInspect commissioning risks
GET/servers/{id}/control-stateRead ownership and control state
GET, POST/projectsList or create projects
GET, PUT, DELETE/projects/{id}Manage a project
GET, POST/projects/{project_id}/environmentsList or create environments
GET, PUT, DELETE/environments/{id}Manage an environment
GET/resourcesList resources across the current scope
GET, POST/environments/{env_id}/resourcesList or create environment resources
GET, PUT, DELETE/resources/{id}Manage a resource
POST/resources/{id}/deployStart a deployment
POST/resources/{id}/deploy/sourceUpload and deploy source
POST/resources/{id}/rollbackRoll back a resource

Storage, backups, and operations

MethodRoutePurpose
GET, POST/storage-providersList or create storage providers
GET, DELETE/storage-providers/{id}Read or delete a storage provider
GET/storage-providers/{id}/browseBrowse stored objects
POST/backupsCreate a resource backup
GET/resources/{resource_id}/backupsList resource backups
GET/backups/{id}/restore/rehearsalCheck restore readiness
POST/backups/{id}/restoreRestore a backup
GET/resources/{resource_id}/deploymentsList deployment history
GET/deployments/{id}/logsRead deployment logs
GET/metrics/queryQuery metrics

WebSockets and streams

RoutePurpose
wss://HOST/api/v1/terminal?server=UUIDInteractive SSH terminal; optional cols and rows query parameters
wss://HOST/api/v1/resources/{id}/logsLive resource logs
wss://HOST/api/v1/resources/{id}/execInteractive resource shell
wss://HOST/api/v1/deployments/{id}/logs/wsLive deployment logs
GET /api/v1/eventsServer-sent deployment status events

Errors

Error responses use an appropriate HTTP status and a JSON body containing an error field. Treat the message as operator-facing text rather than a stable machine-readable error code.