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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
getOptions | query | protected | view | yes |
getPlayChoices | query | protected | view | yes |
trigger | mutation | protected | create | yes |
stop | mutation | protected | create | yes |
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:
viewon capabilitysiren, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=siren.getStatuson your hub
Input
{ deviceId: number }Output
SirenStatusSchemaShapes: SirenStatusSchema
siren.getOptions
- Kind: query —
GET /trpc/siren.getOptions - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysiren, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=siren.getOptionson your hub
Input
{ deviceId: number }Output
SirenOptionsSchemaShapes: SirenOptionsSchema
siren.getPlayChoices
- Kind: query —
GET /trpc/siren.getPlayChoices - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysiren, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=siren.getPlayChoiceson 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:
createon capabilitysiren, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=siren.triggeron your hub
Input
SirenTriggerInputSchemaOutput
SirenStatusSchemaShapes: SirenTriggerInputSchema · SirenStatusSchema
siren.stop
- Kind: mutation —
POST /trpc/siren.stop - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitysiren, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=siren.stopon your hub
Input
{ deviceId: number }Output
SirenStatusSchemaShapes: SirenStatusSchema