Obtaining stream information from backend server¶
Information about the streams on monitored nodes can be obtained from backend server with Websocket API or REST API.
Current streams information¶
Current streams information can be obtained with /api/stream/list
request
Where
node
– node identifier (mandatory)mediaId
– media session identifiername
– stream nameage
– stream cache record age in millisecondspublisher
- publisher identifier (for played streams)status
– stream status (PENDING
,PUBLISHING
,PLAYING
,UNPUBLISHED
,STOPPED
,FAILED
)showClosed
- show closed streams from cachenodeIp
- IP address of server monitorednodeHostName
- hostname of server monitored
Response data are obtained from current metrics cache.
Current instantaneous stream metric values¶
Current instantaneous metric values for stream published or played on WCS can be obtained with /api/stream/metrics
request
Where:
node
– node identifier (mandatory)mediaId
– media session identifier (mandatory)limit
- messages quantity in cache selectionoffset
- cache offsettime
- time stampseq
- cache message sequence number
Response also contains current instantaneous metric values from cache.
Stream history¶
Stream history information can be obtained with /api/stream/history
request
Where
node
– node identifiermediaId
– media session identifiername
– stream namepublisher
- publisher identifier (for played streams)status
– stream status (PENDING
,PUBLISHING
,PLAYING
,UNPUBLISHED
,STOPPED
,FAILED
)limit
- maximum stream count in DB selectionoffset
- offset from stream table beginningid
- stream identifier in backend server databasecreateDate
– stream creation dateendDate
– stream termination dateduration
- длительность потокаsubscribers
- list of identifiers of subscribers (for published streams)
If node Id is set, the response will contain only that node stream history information. If Id is not set, the response will contain all the streams history on backend server corresponding to the other query criteria.
If maximum stream count in DB selection is set to 0, all stream data will be selected from DB. This query can be terminated by timeout if streams count in DB is too big, so it is not recommended to send the query without limits.