API v2 Reference
July 16, 2026 · View on GitHub
This reference is generated from the RestAPI2RouteTree definition in packages/rest-api2/src/routes.ts. It documents all available route nodes, their operations, schemas, and relationships.
Route Tree Overview
The API v2 route tree is organized hierarchically:
root
└─ /spaces/:spaceId → space
├─ (space routes + storage routes)
├─ /hubs/:hubId → hub
│ ├─ (hub routes)
│ ├─ /sequences → sequence (mounted sub-router)
│ └─ /instances/:instanceId → instance
│ └─ (instance routes including stdio, events, rpc)
└─ (topic routes: read, write)
Nodes
- root — root routes (owner:
root) - space — space routes (owner:
space) - hub — hub routes (owner:
hub) - sequence — sequence routes (owner:
hub) - instance — instance routes (owner:
instance)
Route kinds
Routes carry a kind that describes stream semantics:
| Kind | Description |
|---|---|
| (normal/request) | Standard REST request-response |
upstream | Server-to-client stream (read data from the server) |
downstream | Client-to-server stream (send data to the server) |
duplex | Bidirectional stream (both directions) |