Skip to content

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 ​

RoutePurpose
POST /api/cowork/streamA Console turn — SSE events: turn, session, token, tool_*, receipt, done with a terminal reason.
GET /api/cowork/sessionsList or load your practice-scoped sessions (resume).
POST /api/cowork/actionExecute an approved action; GET with the request id recovers the receipt.
GET /api/rmm/tickets · GET /api/rmm/devicesScoped list reads (search, limit, pagination).
POST /api/rmm/devices/[id]/remote-sessionPurpose-bound remote session request (screen / terminal).
GET /api/entitiesCustomer list, permission- and entity-scoped.
GET /api/it/problems · changes · knowledgeITSM 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.

Hesper docs · version v0.1.152