ReferenceHTTP API
lawnMowerControl
The lawnMowerControl router: 4 methods of the lawn-mower-control capability, with tier, scope, input and output.
Capability lawn-mower-control · scope device · mode singleton · source packages/types/src/capabilities/lawn-mower-control.cap.ts:49.
Every method is called at /trpc/lawnMowerControl.<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 |
startMowing | mutation | protected | create | yes |
pause | mutation | protected | create | yes |
dock | mutation | protected | create | yes |
lawnMowerControl.getStatus
- Kind: query —
GET /trpc/lawnMowerControl.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitylawn-mower-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lawnMowerControl.getStatuson your hub
Input
{ deviceId: number }Output
LawnMowerControlStatusSchemaShapes: LawnMowerControlStatusSchema
lawnMowerControl.startMowing
- Kind: mutation —
POST /trpc/lawnMowerControl.startMowing - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylawn-mower-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lawnMowerControl.startMowingon your hub
Input
{ deviceId: number }Output
voidlawnMowerControl.pause
- Kind: mutation —
POST /trpc/lawnMowerControl.pause - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylawn-mower-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lawnMowerControl.pauseon your hub
Input
{ deviceId: number }Output
voidlawnMowerControl.dock
- Kind: mutation —
POST /trpc/lawnMowerControl.dock - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitylawn-mower-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=lawnMowerControl.dockon your hub
Input
{ deviceId: number }Output
void