Dominevo
ReferenceHTTP API

deviceRuns

The deviceRuns router: 3 methods of the device-runs capability, with tier, scope, input and output.

Capability device-runs · scope device · mode singleton · source packages/types/src/capabilities/device-runs.cap.ts:105.

Every method is called at /trpc/deviceRuns.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.

MethodKindTierToken scopeViewer
listRunsqueryprotectedviewyes
getRunqueryprotectedviewyes
getCurrentRunqueryprotectedviewyes

deviceRuns.listRuns

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

Input

{ deviceId: number; outcome?: DeviceRunOutcomeSchema; atFrom?: number; atTo?: number; limit?: number = 50; cursor?: string }

Output

{ runs: DeviceRunSchema[]; nextCursor: string | null }

Shapes: DeviceRunOutcomeSchema · DeviceRunSchema

deviceRuns.getRun

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

Input

{ deviceId: number; runId: string }

Output

DeviceRunSchema | null

Shapes: DeviceRunSchema

deviceRuns.getCurrentRun

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

Input

{ deviceId: number }

Output

DeviceRunSchema | null

Shapes: DeviceRunSchema