Dominevo
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.

MethodKindTierToken scopeViewer
applyBlocksmutationadminadmin onlyno
getStatesqueryadminadmin onlyno

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.applyBlocks on your hub

Input

ComposerApplyInputSchema

Output

ComposerApplyResultSchema

Shapes: 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.getStates on 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 })[] })[] }