ReferenceHTTP API
doNotDisturb
The doNotDisturb router: 2 methods of the do-not-disturb capability, with tier, scope, input and output.
Capability do-not-disturb · scope device · mode singleton · source packages/types/src/capabilities/do-not-disturb.cap.ts:23.
Every method is called at /trpc/doNotDisturb.<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 |
setEnabled | mutation | protected | create | yes |
doNotDisturb.getStatus
- Kind: query —
GET /trpc/doNotDisturb.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydo-not-disturb, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=doNotDisturb.getStatuson your hub
Input
{ deviceId: number }Output
DoNotDisturbStatusSchemaShapes: DoNotDisturbStatusSchema
doNotDisturb.setEnabled
- Kind: mutation —
POST /trpc/doNotDisturb.setEnabled - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitydo-not-disturb, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=doNotDisturb.setEnabledon your hub
Input
{ deviceId: number; enabled: boolean }Output
void