Dominevo
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.

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
getOptionsqueryprotectedviewyes
setSettingsmutationprotectedcreateyes
runFormutationprotectedcreateyes
cancelmutationprotectedcreateyes

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: view on capability timed-run, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=timedRun.getStatus on your hub

Input

{ deviceId: number }

Output

TimedRunStatusSchema

Shapes: TimedRunStatusSchema

timedRun.getOptions

  • Kind: query — GET /trpc/timedRun.getOptions
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability timed-run, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=timedRun.getOptions on your hub

Input

{ deviceId: number }

Output

TimedRunOptionsSchema

Shapes: TimedRunOptionsSchema

timedRun.setSettings

  • Kind: mutation — POST /trpc/timedRun.setSettings
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability timed-run, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=timedRun.setSettings on your hub

Input

{ deviceId: number; settings: TimedRunSettingsPatchSchema }

Output

void

Shapes: TimedRunSettingsPatchSchema

timedRun.runFor

  • Kind: mutation — POST /trpc/timedRun.runFor
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability timed-run, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=timedRun.runFor on your hub

Input

{ deviceId: number; duration: number; unit: TimedRunUnitSchema }

Output

TimedRunResultSchema

Shapes: TimedRunUnitSchema · TimedRunResultSchema

timedRun.cancel

  • Kind: mutation — POST /trpc/timedRun.cancel
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability timed-run, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=timedRun.cancel on your hub

Input

{ deviceId: number }

Output

void