Dominevo
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.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
resetmutationadminadmin onlyno

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: view on capability consumables, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=consumables.getStatus on your hub

Input

{ deviceId: number }

Output

ConsumablesStatusSchema

Shapes: 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.reset on your hub

Input

{ deviceId: number; key: string }

Output

void