ReferenceHTTP API
notifier
The notifier router: 3 methods of the notifier capability, with tier, scope, input and output.
Capability notifier · scope device · mode singleton · source packages/types/src/capabilities/notifier.cap.ts:109.
Every method is called at /trpc/notifier.<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 |
send | mutation | admin | admin only | no |
cancel | mutation | admin | admin only | no |
notifier.getStatus
- Kind: query —
GET /trpc/notifier.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitynotifier, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=notifier.getStatuson your hub
Input
{ deviceId: number }Output
NotifierStatusSchemaShapes: NotifierStatusSchema
notifier.send
- Kind: mutation —
POST /trpc/notifier.send - 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=notifier.sendon your hub
Input
{ deviceId: number; title?: string; body: string; image?: string; priority?: "min" | "low" | "normal" | "high"; channel?: string; recipients?: string[]; actions?: ({ id: string; title: string; uri?: string(url); destructive?: boolean })[]; data?: Record<string, unknown> }Output
{ notificationId: string; acceptedAt: number }notifier.cancel
- Kind: mutation —
POST /trpc/notifier.cancel - 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=notifier.cancelon your hub
Input
{ deviceId: number; notificationId: string }Output
void