Appearance
API overview
The workspace API is the same surface the app, the Console and the CLI use. Everything here is authenticated and practice-scoped; there is no anonymous data access.
Authentication
- Browser/app: Firebase ID tokens.
- CLI / native Console: Hesper CLI management JWTs (OAuth 2.1 + PKCE, loopback or device flow).
Both resolve to the same principal and the same practice scoping — the CLI and the browser see the same data under the same permissions.
The routes the Console uses
| Route | Purpose |
|---|---|
POST /api/cowork/stream | A Console turn — SSE events: turn, session, token, tool_*, receipt, done with a terminal reason. |
GET /api/cowork/sessions | List or load your practice-scoped sessions (resume). |
POST /api/cowork/action | Execute an approved action; GET with the request id recovers the receipt. |
GET /api/rmm/tickets · GET /api/rmm/devices | Scoped list reads (search, limit, pagination). |
POST /api/rmm/devices/[id]/remote-session | Purpose-bound remote session request (screen / terminal). |
GET /api/entities | Customer list, permission- and entity-scoped. |
GET /api/it/problems · changes · knowledge | ITSM records. |
Streaming contract
Events carry a monotonic seq; duplicates are dropped by the clients, gaps are reported. A turn's done event names the terminal reason (completed, turn_limit, aborted, error); a transport close without done is an incomplete turn, never a silent success.
Scoping rules
Every privileged read resolves { practice, actor, permitted customer, ticket, endpoint } server-side. A target outside the operator's scope fails with a scoped 403/404 — the error names the record class, never leaks the record.
Internal (authenticated) API reference and architecture notes live in the in-app knowledge base under the platform tier — see the Knowledge area inside your workspace.