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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStreamSources | query | protected | view | yes |
getConfigEntries | query | protected | view | yes |
setConfig | mutation | admin | admin only | no |
runAction | mutation | protected | create | yes |
removeDevice | mutation | admin | admin only | no |
getSettingsSchema | query | protected | view | yes |
getRawState | query | protected | view | yes |
deviceOps.getStreamSources
- Kind: query —
GET /trpc/deviceOps.getStreamSources - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-ops, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceOps.getStreamSourceson 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:
viewon capabilitydevice-ops, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceOps.getConfigEntrieson 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.setConfigon your hub
Input
{ deviceId: number; values: Record<string, unknown> }Output
voiddeviceOps.runAction
- Kind: mutation —
POST /trpc/deviceOps.runAction - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitydevice-ops, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceOps.runActionon your hub
Input
{ deviceId: number; action: string; input: unknown }Output
unknowndeviceOps.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.removeDeviceon your hub
Input
{ deviceId: number }Output
voiddeviceOps.getSettingsSchema
- Kind: query —
GET /trpc/deviceOps.getSettingsSchema - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-ops, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceOps.getSettingsSchemaon your hub
Input
{ deviceId: number }Output
unknown | nulldeviceOps.getRawState
- Kind: query —
GET /trpc/deviceOps.getRawState - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-ops, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceOps.getRawStateon your hub
Input
{ deviceId: number }Output
RawStateResultSchema | nullShapes: RawStateResultSchema