ReferenceHTTP API
accessories
The accessories router: 2 methods of the accessories capability, with tier, scope, input and output.
Capability accessories · scope device · mode singleton · source packages/types/src/capabilities/accessories.cap.ts:39.
Every method is called at /trpc/accessories.<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 |
setChildHidden | mutation | admin | admin only | no |
accessories.getStatus
- Kind: query —
GET /trpc/accessories.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityaccessories, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=accessories.getStatuson your hub
Input
{ deviceId: number }Output
AccessoriesStatusSchemaShapes: AccessoriesStatusSchema
accessories.setChildHidden
- Kind: mutation —
POST /trpc/accessories.setChildHidden - 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=accessories.setChildHiddenon your hub
Input
{ deviceId: number; childDeviceId: number; hidden: boolean }Output
void