Dominevo
ReferenceHTTP API

update

The update router: 2 methods of the update capability, with tier, scope, input and output.

Capability update · scope device · mode singleton · source packages/types/src/capabilities/update.cap.ts:30.

Every method is called at /trpc/update.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
installUpdatemutationadminadmin onlyno

update.getStatus

  • Kind: query — GET /trpc/update.getStatus (added by the framework)
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability update, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=update.getStatus on your hub

Input

{ deviceId: number }

Output

UpdateStatusSchema

Shapes: UpdateStatusSchema

update.installUpdate

  • Kind: mutation — POST /trpc/update.installUpdate
  • 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=update.installUpdate on your hub

Input

void

Output

void