Dominevo
ReferenceHTTP API

workload

The workload router: 8 methods of the workload capability, with tier, scope, input and output.

Capability workload · scope device · mode singleton · source packages/types/src/capabilities/workload.cap.ts:296.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
startmutationprotectedcreateyes
stopmutationprotectedcreateyes
restartmutationprotectedcreateyes
pausemutationprotectedcreateyes
resumemutationprotectedcreateyes
forceStopmutationadminadmin onlyno
getOptionsqueryprotectedviewyes

workload.getStatus

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

Input

{ deviceId: number }

Output

WorkloadStatusSchema

Shapes: WorkloadStatusSchema

workload.start

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

Input

{ deviceId: number }

Output

void

workload.stop

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

Input

{ deviceId: number }

Output

void

workload.restart

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

Input

{ deviceId: number }

Output

void

workload.pause

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

Input

{ deviceId: number }

Output

void

workload.resume

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

Input

{ deviceId: number }

Output

void

workload.forceStop

  • Kind: mutation — POST /trpc/workload.forceStop
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=workload.forceStop on your hub

Input

{ deviceId: number }

Output

void

workload.getOptions

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

Input

{ deviceId: number }

Output

WorkloadOptionsSchema

Shapes: WorkloadOptionsSchema