Participant Metrics
The GetCallParticipantSessionMetrics endpoint returns detailed media quality metrics for a single participant session, including published track statistics such as bitrate, framerate, and resolution over time. To discover available sessions and their user_session_id values, use the Call Attendance endpoint.
Response overview
user_id: ID of the user.user_session_id: ID of the user's session.publisher_type: Type of publisher (webrtc,rtmp,srt, etc.).joined_at: Timestamp when the participant joined.is_publisher: Whether the participant published media.is_subscriber: Whether the participant subscribed to media.client: Information about the participant's client:name: Client name (e.g. browser or SDK name).version: Client version.ip: IP address.network_type: Network type (e.g.wifi,cellular).location: Geographic location derived from the IP address:city,subdivision,country,country_iso_code,continentlatitude,longitude,accuracy_radius_meters
published_tracks: Array of published track metrics. Each entry contains:track_id: Track identifier.track_type: Track type (audio,video,screensharing, etc.).codec: Codec used.bitrate: Bitrate time series —data_pointsis an array of[timestamp, value]pairs.framerate: Framerate time series (video tracks only).resolution: Resolution time series —widthandheighteach contain adata_pointsarray.warnings: Array of quality warnings:time: Timestamp of the warning.code: Warning code.warning: Human-readable description.
const call = client.video.call("default", "call-id");
const response = await call.getCallParticipantSessionMetrics({
session: "<session-id>",
user: "<user-id>",
user_session: "<user-session-id>",
});call = client.video.call("default", "call-id")
response = call.get_call_participant_session_metrics(
session="<session-id>",
user="<user-id>",
user_session="<user-session-id>",
)call := client.Video().Call("default", "call-id")
response, err := call.GetCallParticipantSessionMetrics(ctx, "<session-id>", "<user-id>", "<user-session-id>", &getstream.GetCallParticipantSessionMetricsRequest{})
if err != nil {
return err
}var call = client.video().call("default", "call-id");
var response = call.getCallParticipantSessionMetrics("<session-id>", "<user-id>", "<user-session-id>");curl -X GET "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/session/${SESSION_ID}/participant/${USER_ID}/${USER_SESSION_ID}/details/track?api_key=${API_KEY}" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"Time range
Use since and until to narrow the metrics to a specific time window within the session. By default, the last 1 minute of the session is returned. The maximum window is 30 minutes.
const response = await call.getCallParticipantSessionMetrics({
session: "<session-id>",
user: "<user-id>",
user_session: "<user-session-id>",
since: new Date("2024-01-01T00:00:00Z"),
until: new Date("2024-01-01T01:00:00Z"),
});from datetime import datetime, timezone
response = call.get_call_participant_session_metrics(
session="<session-id>",
user="<user-id>",
user_session="<user-session-id>",
since=datetime(2024, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
until=datetime(2024, 1, 1, 1, 0, 0, tzinfo=timezone.utc),
)since := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC)
until := time.Date(2024, 1, 1, 1, 0, 0, 0, time.UTC)
response, err := call.GetCallParticipantSessionMetrics(ctx, "<session-id>", "<user-id>", "<user-session-id>", &getstream.GetCallParticipantSessionMetricsRequest{
Since: &since,
Until: &until,
})
if err != nil {
return err
}var response = call.getCallParticipantSessionMetrics(
"<session-id>",
"<user-id>",
"<user-session-id>",
GetCallParticipantSessionMetricsRequest.builder()
.since(new Date(1704067200000L))
.until(new Date(1704070800000L))
.build()
);curl -X GET "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/session/${SESSION_ID}/participant/${USER_ID}/${USER_SESSION_ID}/details/track?api_key=${API_KEY}&since=2024-01-01T00%3A00%3A00Z&until=2024-01-01T01%3A00%3A00Z" \
-H "Authorization: ${TOKEN}" \
-H "stream-auth-type: jwt"