ReferenceHTTP API
deviceExtension
The deviceExtension router: 4 methods of the device-extension capability, with tier, scope, input and output.
Capability device-extension · scope device · mode collection · source packages/types/src/capabilities/device-extension.cap.ts:204.
Every method is called at /trpc/deviceExtension.<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 |
|---|---|---|---|---|
listSources | query | protected | view | yes |
listSlots | query | protected | view | yes |
listCandidates | query | protected | view | yes |
setSlot | mutation | admin | admin only | no |
deviceExtension.listSources
- Kind: query —
GET /trpc/deviceExtension.listSources - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-extension, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceExtension.listSourceson your hub
Input
{ deviceId: number }Output
ExtensionSourceSchema[]Shapes: ExtensionSourceSchema
deviceExtension.listSlots
- Kind: query —
GET /trpc/deviceExtension.listSlots - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-extension, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceExtension.listSlotson your hub
Input
{ deviceId: number }Output
ExtensionSlotRowSchema[]Shapes: ExtensionSlotRowSchema
deviceExtension.listCandidates
- Kind: query —
GET /trpc/deviceExtension.listCandidates - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-extension, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceExtension.listCandidateson your hub
Input
ExtensionSlotRefInputSchemaOutput
ExtensionCandidatesSchemaShapes: ExtensionSlotRefInputSchema · ExtensionCandidatesSchema
deviceExtension.setSlot
- Kind: mutation —
POST /trpc/deviceExtension.setSlot - 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=deviceExtension.setSloton your hub
Input
ExtensionSetSlotInputSchemaOutput
ExtensionSetResultSchemaShapes: ExtensionSetSlotInputSchema · ExtensionSetResultSchema