Dominevo
ReferenceHTTP API

siren

The siren router: 5 methods of the siren capability, with tier, scope, input and output.

Capability siren · scope device · mode singleton · source packages/types/src/capabilities/siren.cap.ts:113.

Every method is called at /trpc/siren.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
getOptionsqueryprotectedviewyes
getPlayChoicesqueryprotectedviewyes
triggermutationprotectedcreateyes
stopmutationprotectedcreateyes

siren.getStatus

  • Kind: query — GET /trpc/siren.getStatus (added by the framework)
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability siren, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=siren.getStatus on your hub

Input

{ deviceId: number }

Output

SirenStatusSchema

Shapes: SirenStatusSchema

siren.getOptions

  • Kind: query — GET /trpc/siren.getOptions
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability siren, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=siren.getOptions on your hub

Input

{ deviceId: number }

Output

SirenOptionsSchema

Shapes: SirenOptionsSchema

siren.getPlayChoices

  • Kind: query — GET /trpc/siren.getPlayChoices
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability siren, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=siren.getPlayChoices on your hub

Input

{ deviceId: number }

Output

number[]

siren.trigger

  • Kind: mutation — POST /trpc/siren.trigger
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability siren, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=siren.trigger on your hub

Input

SirenTriggerInputSchema

Output

SirenStatusSchema

Shapes: SirenTriggerInputSchema · SirenStatusSchema

siren.stop

  • Kind: mutation — POST /trpc/siren.stop
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability siren, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=siren.stop on your hub

Input

{ deviceId: number }

Output

SirenStatusSchema

Shapes: SirenStatusSchema