ReferenceHTTP API
lockControl
The lockControl router: 4 methods of the lock-control capability, with tier, scope, input and output.
Capability lock-control · scope device · mode singleton · source packages/types/src/capabilities/lock-control.cap.ts:92.
Every method is called at /trpc/lockControl.<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 |
lock | mutation | protected | create | yes |
unlock | mutation | protected | create | yes |
open | mutation | protected | create | yes |
lockControl.getStatus
- Kind: query —
GET /trpc/lockControl.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitylock-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lockControl.getStatuson your hub
Input
{ deviceId: number }Output
LockControlStatusSchemaShapes: LockControlStatusSchema
lockControl.lock
- Kind: mutation —
POST /trpc/lockControl.lock - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylock-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lockControl.lockon your hub
Input
{ deviceId: number; code?: string }Output
voidlockControl.unlock
- Kind: mutation —
POST /trpc/lockControl.unlock - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylock-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lockControl.unlockon your hub
Input
{ deviceId: number; code?: string; confirm?: boolean }Output
voidlockControl.open
- Kind: mutation —
POST /trpc/lockControl.open - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylock-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lockControl.openon your hub
Input
{ deviceId: number }Output
void