Dominevo
ReferenceHTTP API

powerSource

The powerSource router: 4 methods of the power-source capability, with tier, scope, input and output.

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

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
powerOnmutationprotectedcreateyes
powerOffmutationprotectedcreateyes
forceRestartmutationprotectedcreateyes

powerSource.getStatus

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

Input

{ deviceId: number }

Output

PowerSourceInfoSchema

Shapes: PowerSourceInfoSchema

powerSource.powerOn

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

Input

{ deviceId: number }

Output

PowerSourceActionResultSchema

Shapes: PowerSourceActionResultSchema

powerSource.powerOff

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

Input

{ deviceId: number }

Output

PowerSourceActionResultSchema

Shapes: PowerSourceActionResultSchema

powerSource.forceRestart

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

Input

{ deviceId: number }

Output

PowerSourceActionResultSchema

Shapes: PowerSourceActionResultSchema