ReferenceHTTP API
live
The live router: 3 hand-written core methods, with tier, input and output.
A core router of the hub (not a capability), source server/backend/src/api/core/live-events.router.ts. Its methods are called at /trpc/live.<method>. A core method checks only the tier: a scoped token that is signed in reaches every protected method here, unless the method itself refuses it. See How to call and Authorization.
Inputs and outputs are the validation schemas as written in the source.
| Method | Kind | Tier |
|---|---|---|
recentSystemEvents | query | protected |
onEvent | subscription | protected |
onDeviceEvent | subscription | protected |
live.recentSystemEvents
- Kind: query —
GET /trpc/live.recentSystemEvents - Tier: protected — any signed-in principal
- Source:
server/backend/src/api/core/live-events.router.ts:26 - Try it: open
/system/api-explorer?method=live.recentSystemEventson your hub
Input
z.object({ category: z.string().optional(), limit: z.number().optional() }).optional()Output
not declaredlive.onEvent
- Kind: subscription —
WebSocket /trpc/live.onEvent - Tier: protected — any signed-in principal
- Source:
server/backend/src/api/core/live-events.router.ts:52 - Try it: open
/system/api-explorer?method=live.onEventon your hub
Input
z.object({ category: z.string().optional() })Output
not declaredlive.onDeviceEvent
- Kind: subscription —
WebSocket /trpc/live.onDeviceEvent - Tier: protected — any signed-in principal
- Source:
server/backend/src/api/core/live-events.router.ts:86 - Try it: open
/system/api-explorer?method=live.onDeviceEventon your hub
Input
z.object({ deviceId: z.number() })Output
not declared