# Sessions ## Fetch all sessions of an App `client.realtimeKit.sessions.getSessions(stringappId, SessionGetSessionsParamsparams, RequestOptionsoptions?): SessionGetSessionsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions` Returns details of all sessions of an App. ### Parameters - `appId: string` The app identifier tag. - `params: SessionGetSessionsParams` - `account_id: string` Path param: The account identifier tag. - `associated_id?: string` Query param: ID of the meeting that sessions should be associated with - `end_time?: string` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `participants?: string` Query param - `per_page?: number` Query param: Number of results per page - `search?: string` Query param: Search string that matches sessions based on meeting title, meeting ID, and session ID - `sort_by?: "minutesConsumed" | "createdAt"` Query param - `"minutesConsumed"` - `"createdAt"` - `sort_order?: "ASC" | "DESC"` Query param - `"ASC"` - `"DESC"` - `start_time?: string` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `status?: "LIVE" | "ENDED"` Query param - `"LIVE"` - `"ENDED"` ### Returns - `SessionGetSessionsResponse` - `data?: Data` - `sessions?: Array` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessions('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "sessions": [ { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} } ] }, "success": true } ``` ## Fetch details of a session `client.realtimeKit.sessions.getSessionDetails(stringappId, stringsessionId, SessionGetSessionDetailsParamsparams, RequestOptionsoptions?): SessionGetSessionDetailsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}` Returns data of the given session ID including recording details. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionDetailsParams` - `account_id: string` Path param: The account identifier tag. - `include_breakout_rooms?: boolean` Query param: List all breakout rooms ### Returns - `SessionGetSessionDetailsResponse` - `data?: Data` - `session?: Session` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionDetails('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "session": { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} } }, "success": true } ``` ## Fetch participants list of a session `client.realtimeKit.sessions.getSessionParticipants(stringappId, stringsessionId, SessionGetSessionParticipantsParamsparams, RequestOptionsoptions?): SessionGetSessionParticipantsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants` Returns a list of participants for the given session ID. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionParticipantsParams` - `account_id: string` Path param: The account identifier tag. - `include_peer_events?: boolean` Query param: if true, response includes all the peer events of participants. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page - `search?: string` Query param: The search query string. You can search using the meeting ID or title. - `sort_by?: "joinedAt" | "duration"` Query param - `"joinedAt"` - `"duration"` - `sort_order?: "ASC" | "DESC"` Query param - `"ASC"` - `"DESC"` - `view?: "raw" | "consolidated"` Query param: In breakout room sessions, the view parameter can be set to `raw` for session specific duration for participants or `consolidated` to accumulate breakout room durations. - `"raw"` - `"consolidated"` ### Returns - `SessionGetSessionParticipantsResponse` - `data?: Data` - `participants?: Array` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `preset_name?: string` Name of the preset associated with the participant. - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionParticipants('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "paging": { "end_offset": 2, "start_offset": 1, "total_count": 123 }, "participants": [ { "created_at": "2023-02-01T10:51:08.039Z", "custom_participant_id": "83qi0i", "display_name": "Mark", "duration": 5.8097, "id": "005f4e0c-4d08-4d4e-a391-a76be75cd296", "joined_at": "2023-02-01T10:51:08.030Z", "left_at": "2023-02-01T10:56:56.612Z", "preset_name": "webinar_participant", "updated_at": "2023-02-01T10:56:56.618Z", "user_id": "0a08343d-a9dc-45f0-9feb-6a64afcc4f81" }, { "created_at": "2023-02-01T10:50:36.853Z", "custom_participant_id": "3uggr", "display_name": "Henry", "duration": 6.9263, "id": "51fdf95f-d893-471a-922b-7db7adb14453", "joined_at": "2023-02-01T10:50:36.846Z\"", "left_at": "2023-02-01T10:57:32.424Z", "preset_name": "webinar_participant", "updated_at": "2023-02-01T10:57:32.431Z", "user_id": "85e7f0fd-7c16-45e9-9d68-f17ef007c4eb" } ] }, "success": true } ``` ## Fetch details of a participant `client.realtimeKit.sessions.getSessionParticipantDetails(stringappId, stringsessionId, stringparticipantId, SessionGetSessionParticipantDetailsParamsparams, RequestOptionsoptions?): SessionGetSessionParticipantDetailsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants/{participant_id}` Returns details of the given participant ID along with call statistics for the given session ID. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `participantId: string` - `params: SessionGetSessionParticipantDetailsParams` - `account_id: string` Path param: The account identifier tag. - `filters?: "device_info" | "ip_information" | "precall_network_information" | 2 more` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `"device_info"` - `"ip_information"` - `"precall_network_information"` - `"events"` - `"quality_stats"` - `include_peer_events?: boolean` Query param: if true, response includes all the peer events of participant. ### Returns - `SessionGetSessionParticipantDetailsResponse` - `data?: Data` - `participant?: Participant` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `peer_stats?: PeerStats` - `config?: string` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `memory?: number` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `portal?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughtput?: number` - `turn_connectivity?: boolean` - `status?: string` - `preset_name?: string` Name of the preset associated with the participant. - `quality_stats?: Array` - `audio_bandwidth?: number` - `audio_packet_loss?: number` - `audio_stats?: Array` - `concealment_events?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `average_quality?: number` - `end?: string` - `peer_id?: string` - `start?: string` - `video_bandwidth?: number` - `video_packet_loss?: number` - `video_stats?: Array` - `frame_height?: number` - `frame_width?: number` - `frames_dropped?: number` - `frames_per_second?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionParticipantDetails( 'app_id', 'session_id', 'participant_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "participant": { "id": "id", "created_at": "created_at", "custom_participant_id": "custom_participant_id", "display_name": "display_name", "duration": 0, "joined_at": "joined_at", "left_at": "left_at", "peer_stats": { "config": "config", "device_info": { "browser": "browser", "browser_version": "browser_version", "cpus": 0, "engine": "engine", "is_mobile": true, "memory": 0, "os": "os", "os_version": "os_version", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "events": [ { "timestamp": "timestamp", "type": "type" } ], "ip_information": { "city": "city", "country": "country", "ip_location": "ip_location", "ipv4": "ipv4", "org": "org", "portal": "portal", "region": "region", "timezone": "timezone" }, "precall_network_information": { "backend_rtt": 0, "effective_networktype": "effective_networktype", "fractional_loss": 0, "jitter": 0, "reflexive_connectivity": true, "relay_connectivity": true, "rtt": 0, "throughtput": 0, "turn_connectivity": true }, "status": "status" }, "preset_name": "preset_name", "quality_stats": [ { "audio_bandwidth": 0, "audio_packet_loss": 0, "audio_stats": [ { "concealment_events": 0, "jitter": 0, "packets_lost": 0, "quality": 0, "timestamp": "timestamp" } ], "average_quality": 0, "end": "end", "peer_id": "peer_id", "start": "start", "video_bandwidth": 0, "video_packet_loss": 0, "video_stats": [ { "frame_height": 0, "frame_width": 0, "frames_dropped": 0, "frames_per_second": 0, "jitter": 0, "packets_lost": 0, "quality": 0, "timestamp": "timestamp" } ] } ], "updated_at": "updated_at", "user_id": "user_id" } }, "success": true } ``` ## Fetch all chat messages of a session `client.realtimeKit.sessions.getSessionChat(stringappId, stringsessionId, SessionGetSessionChatParamsparams, RequestOptionsoptions?): SessionGetSessionChatResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat` Returns a URL to download all chat messages of the session ID in CSV format. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionChatParams` - `account_id: string` The account identifier tag. ### Returns - `SessionGetSessionChatResponse` - `data?: Data` - `chat_download_url: string` URL where the chat logs can be downloaded - `chat_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionChat('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "chat_download_url": "chat_download_url", "chat_download_url_expiry": "chat_download_url_expiry" }, "success": true } ``` ## Fetch the complete transcript for a session `client.realtimeKit.sessions.getSessionTranscripts(stringappId, stringsessionId, SessionGetSessionTranscriptsParamsparams, RequestOptionsoptions?): SessionGetSessionTranscriptsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript` Returns a URL to download the transcript for the session ID in CSV format. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionTranscriptsParams` - `account_id: string` The account identifier tag. ### Returns - `SessionGetSessionTranscriptsResponse` - `data?: Data` - `sessionId: string` - `transcript_download_url: string` URL where the transcript can be downloaded - `transcript_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionTranscripts('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "sessionId": "sessionId", "transcript_download_url": "transcript_download_url", "transcript_download_url_expiry": "transcript_download_url_expiry" }, "success": true } ``` ## Fetch summary of transcripts for a session `client.realtimeKit.sessions.getSessionSummary(stringappId, stringsessionId, SessionGetSessionSummaryParamsparams, RequestOptionsoptions?): SessionGetSessionSummaryResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Returns a Summary URL to download the Summary of Transcripts for the session ID as plain text. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGetSessionSummaryParams` - `account_id: string` The account identifier tag. ### Returns - `SessionGetSessionSummaryResponse` - `data?: Data` - `sessionId: string` - `summaryDownloadUrl: string` URL where the summary of transcripts can be downloaded - `summaryDownloadUrlExpiry: string` Time of Expiry before when you need to download the csv file. - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getSessionSummary('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.data); ``` #### Response ```json { "data": { "sessionId": "sessionId", "summaryDownloadUrl": "summaryDownloadUrl", "summaryDownloadUrlExpiry": "summaryDownloadUrlExpiry" }, "success": true } ``` ## Generate summary of Transcripts for the session `client.realtimeKit.sessions.generateSummaryOfTranscripts(stringappId, stringsessionId, SessionGenerateSummaryOfTranscriptsParamsparams, RequestOptionsoptions?): void` **post** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Trigger Summary generation of Transcripts for the session ID. ### Parameters - `appId: string` The app identifier tag. - `sessionId: string` - `params: SessionGenerateSummaryOfTranscriptsParams` - `account_id: string` The account identifier tag. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.realtimeKit.sessions.generateSummaryOfTranscripts('app_id', 'session_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); ``` ## Fetch details of peer `client.realtimeKit.sessions.getParticipantDataFromPeerId(stringappId, stringpeerId, SessionGetParticipantDataFromPeerIDParamsparams, RequestOptionsoptions?): SessionGetParticipantDataFromPeerIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}` Returns details of the given peer ID along with call statistics for the given session ID. ### Parameters - `appId: string` The app identifier tag. - `peerId: string` - `params: SessionGetParticipantDataFromPeerIDParams` - `account_id: string` Path param: The account identifier tag. - `filters?: "device_info" | "ip_information" | "precall_network_information" | 2 more` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `"device_info"` - `"ip_information"` - `"precall_network_information"` - `"events"` - `"quality_stats"` ### Returns - `SessionGetParticipantDataFromPeerIDResponse` - `data?: Data` - `participant?: Participant` - `id?: string` - `created_at?: string` - `custom_participant_id?: string` - `display_name?: string` - `duration?: number` - `joined_at?: string` - `left_at?: string` - `peer_report?: PeerReport` - `metadata?: Metadata` - `audio_devices_updates?: Array` - `browser_metadata?: BrowserMetadata` - `browser?: string` - `browser_version?: string` - `engine?: string` - `user_agent?: string` - `webgl_support?: string` - `candidate_pairs?: CandidatePairs` - `consuming_transport?: Array` - `producing_transport?: Array` - `available_outgoing_bitrate?: number` - `bytes_discarded_on_send?: number` - `bytes_received?: number` - `bytes_sent?: number` - `current_round_trip_time?: number` - `last_packet_received_timestamp?: number` - `last_packet_sent_timestamp?: number` - `local_candidate_address?: string` - `local_candidate_id?: string` - `local_candidate_network_type?: string` - `local_candidate_port?: number` - `local_candidate_protocol?: string` - `local_candidate_related_address?: string` - `local_candidate_related_port?: number` - `local_candidate_type?: string` - `nominated?: boolean` - `packets_discarded_on_send?: number` - `packets_received?: number` - `packets_sent?: number` - `remote_candidate_address?: string` - `remote_candidate_id?: string` - `remote_candidate_port?: number` - `remote_candidate_protocol?: string` - `remote_candidate_type?: string` - `total_round_trip_time?: number` - `device_info?: DeviceInfo` - `cpus?: number` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `events?: Array` - `name?: string` - `timestamp?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ipv4?: string` - `region?: string` - `timezone?: string` - `pc_metadata?: Array` - `effective_network_type?: string` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `timestamp?: string` - `turn_connectivity?: boolean` - `room_view_type?: string` - `sdk_name?: string` - `sdk_version?: string` - `selected_device_updates?: Array` - `speaker_devices_updates?: Array` - `video_devices_updates?: Array` - `quality?: Quality` - `audio_consumer?: Array` - `audio_consumer_cumulative?: unknown` - `audio_producer?: Array` - `bytes_sent?: number` - `jitter?: number` - `mid?: string` - `mos_quality?: number` - `packets_lost?: number` - `packets_sent?: number` - `producer_id?: string` - `rtt?: number` - `ssrc?: number` - `timestamp?: string` - `audio_producer_cumulative?: AudioProducerCumulative` - `packet_loss?: PacketLoss` - `"10_or_greater_event_fraction"?: number` - `"25_or_greater_event_fraction"?: number` - `"5_or_greater_event_fraction"?: number` - `"50_or_greater_event_fraction"?: number` - `avg?: number` - `quality_mos?: QualityMos` - `avg?: number` - `p50?: number` - `p75?: number` - `p90?: number` - `rtt?: RTT` - `"100ms_or_greater_event_fraction"?: number` - `"250ms_or_greater_event_fraction"?: number` - `"500ms_or_greater_event_fraction"?: number` - `avg?: number` - `screenshare_audio_consumer?: Array` - `screenshare_audio_consumer_cumulative?: unknown` - `screenshare_audio_producer?: Array` - `screenshare_audio_producer_cumulative?: unknown` - `screenshare_video_consumer?: Array` - `screenshare_video_consumer_cumulative?: unknown` - `screenshare_video_producer?: Array` - `screenshare_video_producer_cumulative?: unknown` - `video_consumer?: Array` - `video_consumer_cumulative?: unknown` - `video_producer?: Array` - `video_producer_cumulative?: unknown` - `peer_stats?: PeerStats` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `metadata?: Metadata` - `connection_info?: ConnectionInfo` - `backend_r_t_t?: number` - `connectivity?: Connectivity` - `host?: boolean` - `reflexive?: boolean` - `relay?: boolean` - `effective_network_type?: string` - `fractional_loss?: number` - `ip_details?: IPDetails` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip?: string` - `loc?: string` - `postal?: string` - `region?: string` - `timezone?: string` - `jitter?: number` - `location?: Location` - `coords?: Coords` - `latitude?: number` - `longitude?: number` - `r_t_t?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `quality_stats?: QualityStats` - `audio_bandwidth?: number` - `audio_stats?: Array` - `average_quality?: number` - `end?: string | null` - `first_audio_packet_received?: string` - `first_video_packet_received?: string` - `last_audio_packet_received?: string` - `last_video_packet_received?: string` - `peer_ids?: Array` - `start?: string | null` - `total_audio_packets?: number` - `total_audio_packets_lost?: number` - `total_video_packets?: number` - `total_video_packets_lost?: number` - `video_bandwidth?: number` - `video_stats?: Array` - `role?: string` - `updated_at?: string` - `user_id?: string` - `success?: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.sessions.getParticipantDataFromPeerId( 'app_id', 'peer_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.data); ``` #### Response ```json { "data": { "participant": { "id": "id", "created_at": "created_at", "custom_participant_id": "custom_participant_id", "display_name": "display_name", "duration": 0, "joined_at": "joined_at", "left_at": "left_at", "peer_report": { "metadata": { "audio_devices_updates": [ {} ], "browser_metadata": { "browser": "browser", "browser_version": "browser_version", "engine": "engine", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "candidate_pairs": { "consuming_transport": [ {} ], "producing_transport": [ { "available_outgoing_bitrate": 0, "bytes_discarded_on_send": 0, "bytes_received": 0, "bytes_sent": 0, "current_round_trip_time": 0, "last_packet_received_timestamp": 0, "last_packet_sent_timestamp": 0, "local_candidate_address": "local_candidate_address", "local_candidate_id": "local_candidate_id", "local_candidate_network_type": "local_candidate_network_type", "local_candidate_port": 0, "local_candidate_protocol": "local_candidate_protocol", "local_candidate_related_address": "local_candidate_related_address", "local_candidate_related_port": 0, "local_candidate_type": "local_candidate_type", "nominated": true, "packets_discarded_on_send": 0, "packets_received": 0, "packets_sent": 0, "remote_candidate_address": "remote_candidate_address", "remote_candidate_id": "remote_candidate_id", "remote_candidate_port": 0, "remote_candidate_protocol": "remote_candidate_protocol", "remote_candidate_type": "remote_candidate_type", "total_round_trip_time": 0 } ] }, "device_info": { "cpus": 0, "is_mobile": true, "os": "os", "os_version": "os_version" }, "events": [ { "name": "name", "timestamp": "timestamp" } ], "ip_information": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ipv4": "ipv4", "region": "region", "timezone": "timezone" }, "pc_metadata": [ { "effective_network_type": "effective_network_type", "reflexive_connectivity": true, "relay_connectivity": true, "timestamp": "timestamp", "turn_connectivity": true } ], "room_view_type": "room_view_type", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "selected_device_updates": [ {} ], "speaker_devices_updates": [ {} ], "video_devices_updates": [ {} ] }, "quality": { "audio_consumer": [ {} ], "audio_consumer_cumulative": {}, "audio_producer": [ { "bytes_sent": 0, "jitter": 0, "mid": "mid", "mos_quality": 0, "packets_lost": 0, "packets_sent": 0, "producer_id": "producer_id", "rtt": 0, "ssrc": 0, "timestamp": "timestamp" } ], "audio_producer_cumulative": { "packet_loss": { "10_or_greater_event_fraction": 0, "25_or_greater_event_fraction": 0, "5_or_greater_event_fraction": 0, "50_or_greater_event_fraction": 0, "avg": 0 }, "quality_mos": { "avg": 0, "p50": 0, "p75": 0, "p90": 0 }, "rtt": { "100ms_or_greater_event_fraction": 0, "250ms_or_greater_event_fraction": 0, "500ms_or_greater_event_fraction": 0, "avg": 0 } }, "screenshare_audio_consumer": [ {} ], "screenshare_audio_consumer_cumulative": {}, "screenshare_audio_producer": [ {} ], "screenshare_audio_producer_cumulative": {}, "screenshare_video_consumer": [ {} ], "screenshare_video_consumer_cumulative": {}, "screenshare_video_producer": [ {} ], "screenshare_video_producer_cumulative": {}, "video_consumer": [ {} ], "video_consumer_cumulative": {}, "video_producer": [ {} ], "video_producer_cumulative": {} } }, "peer_stats": { "device_info": { "browser": "browser", "browser_version": "browser_version", "cpus": 0, "engine": "engine", "is_mobile": true, "os": "os", "os_version": "os_version", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "events": [ { "metadata": { "connection_info": { "backend_r_t_t": 0, "connectivity": { "host": true, "reflexive": true, "relay": true }, "effective_network_type": "effective_network_type", "fractional_loss": 0, "ip_details": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ip": "ip", "loc": "loc", "postal": "postal", "region": "region", "timezone": "timezone" }, "jitter": 0, "location": { "coords": { "latitude": 0, "longitude": 0 } }, "r_t_t": 0, "throughput": 0, "turn_connectivity": true } }, "timestamp": "timestamp", "type": "type" } ], "ip_information": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ip_location": "ip_location", "ipv4": "ipv4", "org": "org", "region": "region", "timezone": "timezone" }, "precall_network_information": { "backend_rtt": 0, "effective_networktype": "effective_networktype", "fractional_loss": 0, "jitter": 0, "reflexive_connectivity": true, "relay_connectivity": true, "rtt": 0, "throughput": 0, "turn_connectivity": true } }, "quality_stats": { "audio_bandwidth": 0, "audio_stats": [ {} ], "average_quality": 0, "end": "end", "first_audio_packet_received": "first_audio_packet_received", "first_video_packet_received": "first_video_packet_received", "last_audio_packet_received": "last_audio_packet_received", "last_video_packet_received": "last_video_packet_received", "peer_ids": [ "string" ], "start": "start", "total_audio_packets": 0, "total_audio_packets_lost": 0, "total_video_packets": 0, "total_video_packets_lost": 0, "video_bandwidth": 0, "video_stats": [ {} ] }, "role": "role", "updated_at": "updated_at", "user_id": "user_id" } }, "success": true } ``` ## Domain Types ### Session Get Sessions Response - `SessionGetSessionsResponse` - `data?: Data` - `sessions?: Array` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Session Get Session Details Response - `SessionGetSessionDetailsResponse` - `data?: Data` - `session?: Session` - `id: string` ID of the session - `associated_id: string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `created_at: string` timestamp when session created - `live_participants: number` number of participants currently in the session - `max_concurrent_participants: number` number of maximum participants that were in the session - `meeting_display_name: string` Title of the meeting this session belongs to - `minutes_consumed: number` number of minutes consumed since the session started - `organization_id: string` App id that hosted this session - `started_at: string` timestamp when session started - `status: "LIVE" | "ENDED"` current status of session - `"LIVE"` - `"ENDED"` - `type: "meeting" | "livestream" | "participant"` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: string` timestamp when session was last updated - `breakout_rooms?: Array` - `ended_at?: string` timestamp when session ended - `meta?: unknown` Any meta data about session. - `success?: boolean` ### Session Get Session Participants Response - `SessionGetSessionParticipantsResponse` - `data?: Data` - `participants?: Array` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `preset_name?: string` Name of the preset associated with the participant. - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Session Get Session Participant Details Response - `SessionGetSessionParticipantDetailsResponse` - `data?: Data` - `participant?: Participant` - `id?: string` Participant ID. This maps to the corresponding peerId. - `created_at?: string` timestamp when this participant was created. - `custom_participant_id?: string` ID passed by client to create this participant. - `display_name?: string` Display name of participant when joining the session. - `duration?: number` number of minutes for which the participant was in the session. - `joined_at?: string` timestamp at which participant joined the session. - `left_at?: string` timestamp at which participant left the session. - `peer_stats?: PeerStats` - `config?: string` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `memory?: number` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `portal?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughtput?: number` - `turn_connectivity?: boolean` - `status?: string` - `preset_name?: string` Name of the preset associated with the participant. - `quality_stats?: Array` - `audio_bandwidth?: number` - `audio_packet_loss?: number` - `audio_stats?: Array` - `concealment_events?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `average_quality?: number` - `end?: string` - `peer_id?: string` - `start?: string` - `video_bandwidth?: number` - `video_packet_loss?: number` - `video_stats?: Array` - `frame_height?: number` - `frame_width?: number` - `frames_dropped?: number` - `frames_per_second?: number` - `jitter?: number` - `packets_lost?: number` - `quality?: number` - `timestamp?: string` - `updated_at?: string` timestamp when this participant's data was last updated. - `user_id?: string` User id for this participant. - `success?: boolean` ### Session Get Session Chat Response - `SessionGetSessionChatResponse` - `data?: Data` - `chat_download_url: string` URL where the chat logs can be downloaded - `chat_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Session Get Session Transcripts Response - `SessionGetSessionTranscriptsResponse` - `data?: Data` - `sessionId: string` - `transcript_download_url: string` URL where the transcript can be downloaded - `transcript_download_url_expiry: string` Time when the download URL will expire - `success?: boolean` ### Session Get Session Summary Response - `SessionGetSessionSummaryResponse` - `data?: Data` - `sessionId: string` - `summaryDownloadUrl: string` URL where the summary of transcripts can be downloaded - `summaryDownloadUrlExpiry: string` Time of Expiry before when you need to download the csv file. - `success?: boolean` ### Session Get Participant Data From Peer ID Response - `SessionGetParticipantDataFromPeerIDResponse` - `data?: Data` - `participant?: Participant` - `id?: string` - `created_at?: string` - `custom_participant_id?: string` - `display_name?: string` - `duration?: number` - `joined_at?: string` - `left_at?: string` - `peer_report?: PeerReport` - `metadata?: Metadata` - `audio_devices_updates?: Array` - `browser_metadata?: BrowserMetadata` - `browser?: string` - `browser_version?: string` - `engine?: string` - `user_agent?: string` - `webgl_support?: string` - `candidate_pairs?: CandidatePairs` - `consuming_transport?: Array` - `producing_transport?: Array` - `available_outgoing_bitrate?: number` - `bytes_discarded_on_send?: number` - `bytes_received?: number` - `bytes_sent?: number` - `current_round_trip_time?: number` - `last_packet_received_timestamp?: number` - `last_packet_sent_timestamp?: number` - `local_candidate_address?: string` - `local_candidate_id?: string` - `local_candidate_network_type?: string` - `local_candidate_port?: number` - `local_candidate_protocol?: string` - `local_candidate_related_address?: string` - `local_candidate_related_port?: number` - `local_candidate_type?: string` - `nominated?: boolean` - `packets_discarded_on_send?: number` - `packets_received?: number` - `packets_sent?: number` - `remote_candidate_address?: string` - `remote_candidate_id?: string` - `remote_candidate_port?: number` - `remote_candidate_protocol?: string` - `remote_candidate_type?: string` - `total_round_trip_time?: number` - `device_info?: DeviceInfo` - `cpus?: number` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `events?: Array` - `name?: string` - `timestamp?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ipv4?: string` - `region?: string` - `timezone?: string` - `pc_metadata?: Array` - `effective_network_type?: string` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `timestamp?: string` - `turn_connectivity?: boolean` - `room_view_type?: string` - `sdk_name?: string` - `sdk_version?: string` - `selected_device_updates?: Array` - `speaker_devices_updates?: Array` - `video_devices_updates?: Array` - `quality?: Quality` - `audio_consumer?: Array` - `audio_consumer_cumulative?: unknown` - `audio_producer?: Array` - `bytes_sent?: number` - `jitter?: number` - `mid?: string` - `mos_quality?: number` - `packets_lost?: number` - `packets_sent?: number` - `producer_id?: string` - `rtt?: number` - `ssrc?: number` - `timestamp?: string` - `audio_producer_cumulative?: AudioProducerCumulative` - `packet_loss?: PacketLoss` - `"10_or_greater_event_fraction"?: number` - `"25_or_greater_event_fraction"?: number` - `"5_or_greater_event_fraction"?: number` - `"50_or_greater_event_fraction"?: number` - `avg?: number` - `quality_mos?: QualityMos` - `avg?: number` - `p50?: number` - `p75?: number` - `p90?: number` - `rtt?: RTT` - `"100ms_or_greater_event_fraction"?: number` - `"250ms_or_greater_event_fraction"?: number` - `"500ms_or_greater_event_fraction"?: number` - `avg?: number` - `screenshare_audio_consumer?: Array` - `screenshare_audio_consumer_cumulative?: unknown` - `screenshare_audio_producer?: Array` - `screenshare_audio_producer_cumulative?: unknown` - `screenshare_video_consumer?: Array` - `screenshare_video_consumer_cumulative?: unknown` - `screenshare_video_producer?: Array` - `screenshare_video_producer_cumulative?: unknown` - `video_consumer?: Array` - `video_consumer_cumulative?: unknown` - `video_producer?: Array` - `video_producer_cumulative?: unknown` - `peer_stats?: PeerStats` - `device_info?: DeviceInfo` - `browser?: string` - `browser_version?: string` - `cpus?: number` - `engine?: string` - `is_mobile?: boolean` - `os?: string` - `os_version?: string` - `sdk_name?: string` - `sdk_version?: string` - `user_agent?: string` - `webgl_support?: string` - `events?: Array` - `metadata?: Metadata` - `connection_info?: ConnectionInfo` - `backend_r_t_t?: number` - `connectivity?: Connectivity` - `host?: boolean` - `reflexive?: boolean` - `relay?: boolean` - `effective_network_type?: string` - `fractional_loss?: number` - `ip_details?: IPDetails` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip?: string` - `loc?: string` - `postal?: string` - `region?: string` - `timezone?: string` - `jitter?: number` - `location?: Location` - `coords?: Coords` - `latitude?: number` - `longitude?: number` - `r_t_t?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `timestamp?: string` - `type?: string` - `ip_information?: IPInformation` - `asn?: ASN` - `asn?: string` - `city?: string` - `country?: string` - `ip_location?: string` - `ipv4?: string` - `org?: string` - `region?: string` - `timezone?: string` - `precall_network_information?: PrecallNetworkInformation` - `backend_rtt?: number` - `effective_networktype?: string` - `fractional_loss?: number` - `jitter?: number` - `reflexive_connectivity?: boolean` - `relay_connectivity?: boolean` - `rtt?: number` - `throughput?: number` - `turn_connectivity?: boolean` - `quality_stats?: QualityStats` - `audio_bandwidth?: number` - `audio_stats?: Array` - `average_quality?: number` - `end?: string | null` - `first_audio_packet_received?: string` - `first_video_packet_received?: string` - `last_audio_packet_received?: string` - `last_video_packet_received?: string` - `peer_ids?: Array` - `start?: string | null` - `total_audio_packets?: number` - `total_audio_packets_lost?: number` - `total_video_packets?: number` - `total_video_packets_lost?: number` - `video_bandwidth?: number` - `video_stats?: Array` - `role?: string` - `updated_at?: string` - `user_id?: string` - `success?: boolean`