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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
installUpdate | mutation | admin | admin only | no |
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:
viewon capabilityupdate, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=update.getStatuson your hub
Input
{ deviceId: number }Output
UpdateStatusSchemaShapes: 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.installUpdateon your hub
Input
voidOutput
void