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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getDeviceSettingsContribution | query | protected | view | no |
getDeviceLiveContribution | query | protected | view | no |
applyDeviceSettingsPatch | mutation | admin | admin only | no |
reportStreamSignal | mutation | protected | create | no |
publishCameraStream | mutation | admin | admin only | no |
retractCameraStream | mutation | admin | admin only | no |
assignProfile | mutation | admin | admin only | no |
unassignProfile | mutation | admin | admin only | no |
forgetDeviceHardware | mutation | admin | admin only | no |
renderPreBufferClip | mutation | admin | admin only | no |
produceEventMedia | mutation | admin | admin only | no |
fetchEventMedia | mutation | admin | admin only | no |
listAllCameraStreams | query | protected | view | no |
listAllProfileSlots | query | protected | view | no |
getBrokerStats | query | protected | view | no |
previewDerivedEncode | query | protected | view | no |
probeStream | mutation | admin | admin only | no |
listClients | query | protected | view | no |
getLiveViewerCounts | query | protected | view | yes |
killClient | mutation | admin | admin only | no |
restartProfile | mutation | admin | admin only | no |
getStreamUrl | query | protected | view | no |
getStreamWithCodec | mutation | admin | admin only | no |
releaseStreamWithCodec | mutation | admin | admin only | no |
acquireEgressTranscode | mutation | admin | admin only | no |
releaseEgressTranscode | mutation | admin | admin only | no |
subscribeAudioChunks | mutation | protected | create | no |
pullAudioChunks | query | protected | view | no |
unsubscribeAudioChunks | mutation | protected | create | no |
setPreBufferDuration | mutation | admin | admin only | no |
getPreBufferInfo | query | protected | view | no |
getRtspPort | query | protected | view | no |
getAllRtspEntries | query | protected | view | no |
getRtspEntry | query | protected | view | no |
regenerateRtspToken | mutation | admin | admin only | no |
setRtspEnabled | mutation | admin | admin only | no |
isRtspEnabled | query | protected | view | no |
getDeviceAudioMute | query | protected | view | no |
setDeviceAudioMute | mutation | admin | admin only | no |
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:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getDeviceSettingsContributionon 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[] })[] } | nullstreamBroker.getDeviceLiveContribution
- Kind: query —
GET /trpc/streamBroker.getDeviceLiveContribution(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getDeviceLiveContributionon 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[] })[] } | nullstreamBroker.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.applyDeviceSettingsPatchon 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:
createon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.reportStreamSignalon 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.publishCameraStreamon 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.retractCameraStreamon 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.assignProfileon 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.unassignProfileon 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.forgetDeviceHardwareon 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.renderPreBufferClipon 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.produceEventMediaon 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
EventMediaProductionSchemaShapes: 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.fetchEventMediaon your hub
Input
{ handle: string }Output
{ base64: string; mime: string; bytes: number } | nullstreamBroker.listAllCameraStreams
- Kind: query —
GET /trpc/streamBroker.listAllCameraStreams - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.listAllCameraStreamson your hub
Input
voidOutput
CameraStreamSchema[]Shapes: CameraStreamSchema
streamBroker.listAllProfileSlots
- Kind: query —
GET /trpc/streamBroker.listAllProfileSlots - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.listAllProfileSlotson your hub
Input
voidOutput
ProfileSlotSchema[]Shapes: ProfileSlotSchema
streamBroker.getBrokerStats
- Kind: query —
GET /trpc/streamBroker.getBrokerStats - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getBrokerStatson your hub
Input
{ brokerId: string }Output
BrokerStatsSchemaShapes: BrokerStatsSchema
streamBroker.previewDerivedEncode
- Kind: query —
GET /trpc/streamBroker.previewDerivedEncode - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.previewDerivedEncodeon 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
PreviewDerivedEncodeResultSchemaShapes: 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.probeStreamon 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:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.listClientson your hub
Input
{ brokerId: string }Output
BrokerClientsSchemaShapes: BrokerClientsSchema
streamBroker.getLiveViewerCounts
- Kind: query —
GET /trpc/streamBroker.getLiveViewerCounts - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=streamBroker.getLiveViewerCountson your hub
Input
voidOutput
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.killClienton 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.restartProfileon 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:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getStreamUrlon 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.getStreamWithCodecon your hub
Input
GetStreamWithCodecInputSchemaOutput
RtpSourceSchemaShapes: 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.releaseStreamWithCodecon 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.acquireEgressTranscodeon your hub
Input
EgressTranscodeRequestSchemaOutput
EgressTranscodeSchemaShapes: 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.releaseEgressTranscodeon 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:
createon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.subscribeAudioChunkson your hub
Input
SubscribeAudioChunksInputSchemaOutput
SubscribeAudioChunksResultSchemaShapes: SubscribeAudioChunksInputSchema · SubscribeAudioChunksResultSchema
streamBroker.pullAudioChunks
- Kind: query —
GET /trpc/streamBroker.pullAudioChunks - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.pullAudioChunkson 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:
createon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.unsubscribeAudioChunkson 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.setPreBufferDurationon your hub
Input
{ brokerId: string; seconds: number }Output
voidstreamBroker.getPreBufferInfo
- Kind: query —
GET /trpc/streamBroker.getPreBufferInfo - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getPreBufferInfoon 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:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getRtspPorton your hub
Input
voidOutput
numberstreamBroker.getAllRtspEntries
- Kind: query —
GET /trpc/streamBroker.getAllRtspEntries - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getAllRtspEntrieson 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:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getRtspEntryon your hub
Input
{ brokerId: string; hostname?: string }Output
RtspRestreamEntrySchema | nullShapes: 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.regenerateRtspTokenon your hub
Input
{ brokerId: string }Output
string | nullstreamBroker.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.setRtspEnabledon your hub
Input
{ brokerId: string; enabled: boolean }Output
voidstreamBroker.isRtspEnabled
- Kind: query —
GET /trpc/streamBroker.isRtspEnabled - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.isRtspEnabledon your hub
Input
{ brokerId: string }Output
booleanstreamBroker.getDeviceAudioMute
- Kind: query —
GET /trpc/streamBroker.getDeviceAudioMute - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitystream-broker, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=streamBroker.getDeviceAudioMuteon 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.setDeviceAudioMuteon your hub
Input
{ deviceId: number; muted: boolean }Output
{ muted: boolean; appliedBrokers: number }