const call = client.video.call("default", "call-id");
const response = await call.getCallParticipantSessionMetrics({
session: "<session-id>",
user: "<user-id>",
user_session: "<user-session-id>",
});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.
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"),
});