ReferenceHTTP API
timedRun
The timedRun router: 5 methods of the timed-run capability, with tier, scope, input and output.
Capability timed-run · scope device · mode singleton · source packages/types/src/capabilities/timed-run.cap.ts:170.
Every method is called at /trpc/timedRun.<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 |
getOptions | query | protected | view | yes |
setSettings | mutation | protected | create | yes |
runFor | mutation | protected | create | yes |
cancel | mutation | protected | create | yes |
timedRun.getStatus
- Kind: query —
GET /trpc/timedRun.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitytimed-run, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=timedRun.getStatuson your hub
Input
{ deviceId: number }Output
TimedRunStatusSchemaShapes: TimedRunStatusSchema
timedRun.getOptions
- Kind: query —
GET /trpc/timedRun.getOptions - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitytimed-run, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=timedRun.getOptionson your hub
Input
{ deviceId: number }Output
TimedRunOptionsSchemaShapes: TimedRunOptionsSchema
timedRun.setSettings
- Kind: mutation —
POST /trpc/timedRun.setSettings - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitytimed-run, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=timedRun.setSettingson your hub
Input
{ deviceId: number; settings: TimedRunSettingsPatchSchema }Output
voidShapes: TimedRunSettingsPatchSchema
timedRun.runFor
- Kind: mutation —
POST /trpc/timedRun.runFor - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitytimed-run, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=timedRun.runForon your hub
Input
{ deviceId: number; duration: number; unit: TimedRunUnitSchema }Output
TimedRunResultSchemaShapes: TimedRunUnitSchema · TimedRunResultSchema
timedRun.cancel
- Kind: mutation —
POST /trpc/timedRun.cancel - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitytimed-run, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=timedRun.cancelon your hub
Input
{ deviceId: number }Output
void