Dominevo
ReferenceHTTP API

deviceOps

The deviceOps router: 7 methods of the device-ops capability, with tier, scope, input and output.

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

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

MethodKindTierToken scopeViewer
getStreamSourcesqueryprotectedviewyes
getConfigEntriesqueryprotectedviewyes
setConfigmutationadminadmin onlyno
runActionmutationprotectedcreateyes
removeDevicemutationadminadmin onlyno
getSettingsSchemaqueryprotectedviewyes
getRawStatequeryprotectedviewyes

deviceOps.getStreamSources

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

Input

{ deviceId: number }

Output

({ id: string; label: string; protocol: "rtsp" | "rtmp" | "annexb" | "http-mjpeg" | "webrtc" | "custom"; url?: string; resolution?: { width: number; height: number }; fps?: number; bitrate?: number; codec?: string; profileHint?: CamProfileSchema; sdp?: string })[]

Shapes: CamProfileSchema

deviceOps.getConfigEntries

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

Input

{ deviceId: number }

Output

({ key: string; value: unknown })[]

deviceOps.setConfig

  • Kind: mutation — POST /trpc/deviceOps.setConfig
  • 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=deviceOps.setConfig on your hub

Input

{ deviceId: number; values: Record<string, unknown> }

Output

void

deviceOps.runAction

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

Input

{ deviceId: number; action: string; input: unknown }

Output

unknown

deviceOps.removeDevice

  • Kind: mutation — POST /trpc/deviceOps.removeDevice
  • 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=deviceOps.removeDevice on your hub

Input

{ deviceId: number }

Output

void

deviceOps.getSettingsSchema

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

Input

{ deviceId: number }

Output

unknown | null

deviceOps.getRawState

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

Input

{ deviceId: number }

Output

RawStateResultSchema | null

Shapes: RawStateResultSchema