Dominevo
ReferenceHTTP API

streamBroker

The streamBroker router: 39 methods of the stream-broker capability, with tier, scope, input and output.

Capability stream-broker · scope system · mode singleton · source packages/types/src/capabilities/stream-broker.cap.ts:475.

Every method is called at /trpc/streamBroker.<method> — queries with GET, mutations with POST. See How to call and Authorization.

MethodKindTierToken scopeViewer
getDeviceSettingsContributionqueryprotectedviewno
getDeviceLiveContributionqueryprotectedviewno
applyDeviceSettingsPatchmutationadminadmin onlyno
reportStreamSignalmutationprotectedcreateno
publishCameraStreammutationadminadmin onlyno
retractCameraStreammutationadminadmin onlyno
assignProfilemutationadminadmin onlyno
unassignProfilemutationadminadmin onlyno
forgetDeviceHardwaremutationadminadmin onlyno
renderPreBufferClipmutationadminadmin onlyno
produceEventMediamutationadminadmin onlyno
fetchEventMediamutationadminadmin onlyno
listAllCameraStreamsqueryprotectedviewno
listAllProfileSlotsqueryprotectedviewno
getBrokerStatsqueryprotectedviewno
previewDerivedEncodequeryprotectedviewno
probeStreammutationadminadmin onlyno
listClientsqueryprotectedviewno
getLiveViewerCountsqueryprotectedviewyes
killClientmutationadminadmin onlyno
restartProfilemutationadminadmin onlyno
getStreamUrlqueryprotectedviewno
getStreamWithCodecmutationadminadmin onlyno
releaseStreamWithCodecmutationadminadmin onlyno
acquireEgressTranscodemutationadminadmin onlyno
releaseEgressTranscodemutationadminadmin onlyno
subscribeAudioChunksmutationprotectedcreateno
pullAudioChunksqueryprotectedviewno
unsubscribeAudioChunksmutationprotectedcreateno
setPreBufferDurationmutationadminadmin onlyno
getPreBufferInfoqueryprotectedviewno
getRtspPortqueryprotectedviewno
getAllRtspEntriesqueryprotectedviewno
getRtspEntryqueryprotectedviewno
regenerateRtspTokenmutationadminadmin onlyno
setRtspEnabledmutationadminadmin onlyno
isRtspEnabledqueryprotectedviewno
getDeviceAudioMutequeryprotectedviewno
setDeviceAudioMutemutationadminadmin onlyno

streamBroker.getDeviceSettingsContribution

  • Kind: query — GET /trpc/streamBroker.getDeviceSettingsContribution (added by the framework)
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getDeviceSettingsContribution on your hub

Input

{ deviceId: number }

Output

{ tabs?: ({ id: string; label: string; icon: string; order?: number })[]; sections: ({ id: string; title: string; description?: string; style?: "card" | "accordion"; defaultCollapsed?: boolean; columns?: 1 | 2 | 3 | 4; tab?: string; location?: "settings" | "top-tab" | "hero"; order?: number; fields: any[] })[] } | null

streamBroker.getDeviceLiveContribution

  • Kind: query — GET /trpc/streamBroker.getDeviceLiveContribution (added by the framework)
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getDeviceLiveContribution on your hub

Input

{ deviceId: number }

Output

{ tabs?: ({ id: string; label: string; icon: string; order?: number })[]; sections: ({ id: string; title: string; description?: string; style?: "card" | "accordion"; defaultCollapsed?: boolean; columns?: 1 | 2 | 3 | 4; tab?: string; location?: "settings" | "top-tab" | "hero"; order?: number; fields: any[] })[] } | null

streamBroker.applyDeviceSettingsPatch

  • Kind: mutation — POST /trpc/streamBroker.applyDeviceSettingsPatch (added by the framework)
  • 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=streamBroker.applyDeviceSettingsPatch on your hub

Input

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

Output

{ success: true }

streamBroker.reportStreamSignal

  • Kind: mutation — POST /trpc/streamBroker.reportStreamSignal
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.reportStreamSignal on your hub

Input

{ deviceId: number; code: string; at?: number }

Output

{ accepted: boolean; reason: "woke" | "hold-extended" | "not-enabled" | "no-consumer" | "unknown-code" }

streamBroker.publishCameraStream

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

Input

{ deviceId: number; camStreamId: string; kind: CamStreamKindSchema; url?: string; codec?: string; resolution?: CamStreamResolutionSchema; fps?: number; label?: string; deviceFeatures?: string[]; autoEligible?: boolean; profileHint?: CamProfileSchema; metadata?: Record<string, unknown>; maxSessionMs?: number; sourceCamStreamId?: string; encodeProfile?: { video: { codec: "h264" | "h265" | "copy" | "source"; profile?: "baseline" | "main" | "high"; level?: string; width?: number; height?: number; fps?: number; bitrateKbps?: number; gopFrames?: number; bf?: number; preset?: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium"; tune?: "zerolatency" | "film" | "animation"; singleSlicePerFrame?: boolean }; audio: "passthrough" | { codec: "opus" | "aac" | "pcmu" | "pcma" | "copy" | "none"; bitrateKbps?: number; sampleRateHz?: number; channels?: 1 | 2 }; inputArgs?: string[]; outputArgs?: string[] } }

Output

{ success: true }

Shapes: CamStreamKindSchema · CamStreamResolutionSchema · CamProfileSchema

streamBroker.retractCameraStream

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

Input

{ deviceId: number; camStreamId: string }

Output

{ success: true }

streamBroker.assignProfile

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

Input

{ deviceId: number; profile: CamProfileSchema; camStreamId: string }

Output

{ success: true }

Shapes: CamProfileSchema

streamBroker.unassignProfile

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

Input

{ deviceId: number; profile: CamProfileSchema }

Output

{ success: true }

Shapes: CamProfileSchema

streamBroker.forgetDeviceHardware

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

Input

{ deviceId: number }

Output

{ derivedStreamsDeleted: string[]; assignmentsPurged: boolean; probeSnapshotsDropped: number; rtspTokenRowsDeleted: number }

streamBroker.renderPreBufferClip

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

Input

{ deviceId: number; profile?: CamProfileSchema; aroundMs: number; preRollSec?: number = 3; postRollSec?: number = 5; format?: "gif" | "mp4" = "gif"; maxWidth?: number = 480; fps?: number = 5; speed?: number = 2 }

Output

{ base64: string; mime: string; bytes: number; profile: CamProfileSchema; durationMs: number }

Shapes: CamProfileSchema

streamBroker.produceEventMedia

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

Input

{ deviceId: number; profile?: CamProfileSchema; aroundMs: number; preSeconds?: number = 4; postSeconds?: number = 6; kinds?: EventMediaKindSchema[] = ["mp4"]; gifMaxWidth?: number = 640; gifFps?: number = 12; gifSpeed?: number = 4; speed?: number = 4 }

Output

EventMediaProductionSchema

Shapes: CamProfileSchema · EventMediaKindSchema · EventMediaProductionSchema

streamBroker.fetchEventMedia

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

Input

{ handle: string }

Output

{ base64: string; mime: string; bytes: number } | null

streamBroker.listAllCameraStreams

  • Kind: query — GET /trpc/streamBroker.listAllCameraStreams
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.listAllCameraStreams on your hub

Input

void

Output

CameraStreamSchema[]

Shapes: CameraStreamSchema

streamBroker.listAllProfileSlots

  • Kind: query — GET /trpc/streamBroker.listAllProfileSlots
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.listAllProfileSlots on your hub

Input

void

Output

ProfileSlotSchema[]

Shapes: ProfileSlotSchema

streamBroker.getBrokerStats

  • Kind: query — GET /trpc/streamBroker.getBrokerStats
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getBrokerStats on your hub

Input

{ brokerId: string }

Output

BrokerStatsSchema

Shapes: BrokerStatsSchema

streamBroker.previewDerivedEncode

  • Kind: query — GET /trpc/streamBroker.previewDerivedEncode
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.previewDerivedEncode on your hub

Input

{ deviceId: number; profile: { video: { codec: "h264" | "h265" | "copy" | "source"; profile?: "baseline" | "main" | "high"; level?: string; width?: number; height?: number; fps?: number; bitrateKbps?: number; gopFrames?: number; bf?: number; preset?: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium"; tune?: "zerolatency" | "film" | "animation"; singleSlicePerFrame?: boolean }; audio: "passthrough" | { codec: "opus" | "aac" | "pcmu" | "pcma" | "copy" | "none"; bitrateKbps?: number; sampleRateHz?: number; channels?: 1 | 2 }; inputArgs?: string[]; outputArgs?: string[] }; source?: DerivedSourceRefSchema }

Output

PreviewDerivedEncodeResultSchema

Shapes: DerivedSourceRefSchema · PreviewDerivedEncodeResultSchema

streamBroker.probeStream

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

Input

{ brokerId: string }

Output

{ probed: boolean; summary: string }

streamBroker.listClients

  • Kind: query — GET /trpc/streamBroker.listClients
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.listClients on your hub

Input

{ brokerId: string }

Output

BrokerClientsSchema

Shapes: BrokerClientsSchema

streamBroker.getLiveViewerCounts

  • Kind: query — GET /trpc/streamBroker.getLiveViewerCounts
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: yes
  • Try it: open /system/api-explorer?method=streamBroker.getLiveViewerCounts on your hub

Input

void

Output

LiveViewerCountSchema[]

Shapes: LiveViewerCountSchema

streamBroker.killClient

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

Input

{ brokerId: string; channel: "rtsp" | "audio"; handle: string }

Output

{ killed: boolean }

streamBroker.restartProfile

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

Input

{ deviceId: number; profile: CamProfileSchema }

Output

{ success: boolean }

Shapes: CamProfileSchema

streamBroker.getStreamUrl

  • Kind: query — GET /trpc/streamBroker.getStreamUrl
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getStreamUrl on your hub

Input

{ streamId: string; format: StreamFormatSchema }

Output

{ url: string }

Shapes: StreamFormatSchema

streamBroker.getStreamWithCodec

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

Input

GetStreamWithCodecInputSchema

Output

RtpSourceSchema

Shapes: GetStreamWithCodecInputSchema · RtpSourceSchema

streamBroker.releaseStreamWithCodec

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

Input

{ pipelineKey: string }

Output

{ released: boolean; refcount: number }

streamBroker.acquireEgressTranscode

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

Input

EgressTranscodeRequestSchema

Output

EgressTranscodeSchema

Shapes: EgressTranscodeRequestSchema · EgressTranscodeSchema

streamBroker.releaseEgressTranscode

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

Input

{ pipelineKey: string }

Output

{ released: boolean; refcount: number }

streamBroker.subscribeAudioChunks

  • Kind: mutation — POST /trpc/streamBroker.subscribeAudioChunks
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.subscribeAudioChunks on your hub

Input

SubscribeAudioChunksInputSchema

Output

SubscribeAudioChunksResultSchema

Shapes: SubscribeAudioChunksInputSchema · SubscribeAudioChunksResultSchema

streamBroker.pullAudioChunks

  • Kind: query — GET /trpc/streamBroker.pullAudioChunks
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.pullAudioChunks on your hub

Input

{ subscriptionId: string; maxCount?: number = 8 }

Output

DecodedAudioChunkSchema[]

Shapes: DecodedAudioChunkSchema

streamBroker.unsubscribeAudioChunks

  • Kind: mutation — POST /trpc/streamBroker.unsubscribeAudioChunks
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.unsubscribeAudioChunks on your hub

Input

{ subscriptionId: string }

Output

{ released: boolean }

streamBroker.setPreBufferDuration

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

Input

{ brokerId: string; seconds: number }

Output

void

streamBroker.getPreBufferInfo

  • Kind: query — GET /trpc/streamBroker.getPreBufferInfo
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getPreBufferInfo on your hub

Input

{ brokerId: string }

Output

{ configuredSec: number; bufferedMs: number; packetCount: number }

streamBroker.getRtspPort

  • Kind: query — GET /trpc/streamBroker.getRtspPort
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getRtspPort on your hub

Input

void

Output

number

streamBroker.getAllRtspEntries

  • Kind: query — GET /trpc/streamBroker.getAllRtspEntries
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getAllRtspEntries on your hub

Input

{ hostname?: string }

Output

RtspRestreamEntrySchema[]

Shapes: RtspRestreamEntrySchema

streamBroker.getRtspEntry

  • Kind: query — GET /trpc/streamBroker.getRtspEntry
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getRtspEntry on your hub

Input

{ brokerId: string; hostname?: string }

Output

RtspRestreamEntrySchema | null

Shapes: RtspRestreamEntrySchema

streamBroker.regenerateRtspToken

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

Input

{ brokerId: string }

Output

string | null

streamBroker.setRtspEnabled

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

Input

{ brokerId: string; enabled: boolean }

Output

void

streamBroker.isRtspEnabled

  • Kind: query — GET /trpc/streamBroker.isRtspEnabled
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.isRtspEnabled on your hub

Input

{ brokerId: string }

Output

boolean

streamBroker.getDeviceAudioMute

  • Kind: query — GET /trpc/streamBroker.getDeviceAudioMute
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability stream-broker, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=streamBroker.getDeviceAudioMute on your hub

Input

{ deviceId: number }

Output

{ muted: boolean; appliedBrokers: number }

streamBroker.setDeviceAudioMute

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

Input

{ deviceId: number; muted: boolean }

Output

{ muted: boolean; appliedBrokers: number }