Sessions

Sessions are tracking user actions regarding pushing and pulling video data to and from the core. There are different kind of sessions that are captured:

  • HLS Sessions (hls collector) How many users are watching an HLS stream

  • HLS Ingress Sessions (hlsingress collector) How many users are publishing a stream via the in-memory filesystem

  • HTTP Sessions (http collector) How many users are reading or writing http data via the build-in HTTP server

  • RTMP Sessions (rtmp collector) How many users are publishing or watching a stream via the built-in RTMP server

  • SRT Sessions (srt collector) How many users are publishing or watching a stream via the built-in SRT server

  • FFmpeg Sessions (ffmpeg collector) How many streams is FFmpeg using as an input or as an output

The data for each session include the current ingress and egress bandwidth, the total amount of data, an identifier for the session itself, the local end of the stream and the remote end of the stream.

The following API endpoints allow to extract information about the currently active sessions or additionally a summary of the already finished sessions. Each endpoint requires a comma-separated list of collectors as query parameter collectors.

Active sessions with summary

Example:

curl http://127.0.0.1:8080/api/v3/session?collectors=hls,rtmp \
   -H 'accept: application/json' \
   -H 'Content-Type: application/json' \
   -X GET

Description:

Get a summary of all active and past sessions

Get a summary of all active and past sessions of the given collector.

GET//api/v3/session
Authorization
Query parameters
Response

Sessions summary

Body
Other propertiesapi.SessionSummary (object)
Request
const response = await fetch('//api/v3/session', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Active sessions

Example:

curl http://127.0.0.1:8080/api/v3/session/active?collectors=hls,rtmp \
   -H 'accept: application/json' \
   -H 'Content-Type: application/json' \
   -X GET

Description:

Get a minimal summary of all active sessions

Get a minimal summary of all active sessions (i.e. number of sessions, bandwidth).

GET//api/v3/session/active
Authorization
Query parameters
Response

Active sessions listing

Body
Other propertiesarray of api.Session (object)
Request
const response = await fetch('//api/v3/session/active', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Last updated