/docs/api
Documentation GuidesAPI prototype v1.0.0

REST, SSE & WS API Reference

Complete API reference for workstation instances, Docker resources, SSE telemetry streams, and WebSockets.

REST, SSE & WS API Reference

The prototype backend exposes a unified REST and real-time streaming API. All endpoints are prefixed with /api and bind strictly to 127.0.0.1.

http
# Healthcheck & Architecture Status
GET http://127.0.0.1:8080/api/health

📋 Categorized Endpoints Reference

DomainMethodEndpointDescription
SystemGET/api/healthService health status and system runtime info.
SystemGET/api/configSanitized runtime configuration (credentials excluded).
SystemGET/api/system/fs?path=...Host directory file browser with path containment.
SystemGET/api/system/runtimesList available OCI runtimes registered on the Docker daemon.
CatalogGET/api/catalog/presetsList curated workstation and database presets.
CatalogGET/api/catalog/ports/nextScans host TCP ports and returns next available free port.
InstancesGET/api/instancesList all managed workstations and headless services.
InstancesPOST/api/instancesProvision a new workstation or service container.
InstancesGET/api/instances/:id/inspectLow-level kernel, namespace, and capability inspection.
InstancesGET/api/instances/:id/composeReal-time synthesized Docker Compose v3.8 spec.
InstancesPOST/api/instances/:id/compose/applyApply edited Docker Compose configuration to instance.
LifecyclePOST/api/instances/:id/:actionPower actions (start, stop, restart, pause, unpause).
LifecycleDELETE/api/instances/:id?delete_volumes=...Destroy container (preserves named volumes by default).
SnapshotsGET / POST/api/instances/:id/snapshotsList or create point-in-time container image snapshots.
SnapshotsPOST/api/instances/:id/cloneClone instance with new identity and next free port.
ResourcesGET / POST/api/images, /api/images/pull, /api/images/pruneDocker images inspection, pull, and dangling layer pruning.
ResourcesGET / POST/api/volumes, /api/volumes/pruneDocker named volume management and deep pruning.
ResourcesGET / POST/api/networks, /api/networks/pruneDocker bridge networks and container connect/disconnect.
TelemetryGET/api/instances/:id/statsReal-time SSE metrics stream (cpu_percent, memory_usage_mb).
TelemetryGET/api/instances/:id/logs?tail=150Real-time SSE streaming stdout/stderr container logs.
TerminalGET/api/instances/:id/terminalIn-browser WebSocket root PTY session (xterm.js).

⚙️ Environment Variables Reference

VariableDefaultPurpose
PORT8080HTTP daemon listening port on host.
BIND_HOST127.0.0.1 (0.0.0.0 in Docker)Network interface for the management daemon listener.
DEFAULT_INSTANCE_BIND_IP127.0.0.1Host loopback interface used for workstation desktop ports.
DEFAULT_NETWORKprototype-netDefault Docker bridge network created automatically on boot.
BASE_PORT3000Starting port checked by the loopback port scanner.
DEFAULT_SHM_SIZE_MB1024Default /dev/shm shared memory allocation (in MB).
APP_TITLEprototypeBranding title displayed in header and browser tabs.