ReferenceHTTP API
composer
The composer router: 2 methods of the composer capability, with tier, scope, input and output.
Capability composer · scope system · mode singleton · source packages/types/src/capabilities/composer.cap.ts:96.
Every method is called at /trpc/composer.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
applyBlocks | mutation | admin | admin only | no |
getStates | query | admin | admin only | no |
composer.applyBlocks
- Kind: mutation —
POST /trpc/composer.applyBlocks - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=composer.applyBlockson your hub
Input
ComposerApplyInputSchemaOutput
ComposerApplyResultSchemaShapes: ComposerApplyInputSchema · ComposerApplyResultSchema
composer.getStates
- Kind: query —
GET /trpc/composer.getStates - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=composer.getStateson your hub
Input
{ blockIds: string[] }Output
{ states: ({ blockId: string; deviceId: number | null; status: "stopped" | "starting" | "running" | "degraded" | "incomplete" | "failed"; reason?: string; fields: ({ cap: string; path: string; item?: { arrayPath: string; key: string; label: string; resettable?: boolean }; state: "fresh" | "stale" | "unavailable"; value: string | number | boolean | null; reason?: string })[] })[] }