ReferenceHTTP API
consumables
The consumables router: 2 methods of the consumables capability, with tier, scope, input and output.
Capability consumables · scope device · mode singleton · source packages/types/src/capabilities/consumables.cap.ts:250.
Every method is called at /trpc/consumables.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
consumables.getStatus
- Kind: query —
GET /trpc/consumables.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityconsumables, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=consumables.getStatuson your hub
Input
{ deviceId: number }Output
ConsumablesStatusSchemaShapes: ConsumablesStatusSchema
consumables.reset
- Kind: mutation —
POST /trpc/consumables.reset - 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=consumables.reseton your hub
Input
{ deviceId: number; key: string }Output
void