# Sessions ## Fetch all sessions of an App `client.RealtimeKit.Sessions.GetSessions(ctx, appID, params) (*SessionGetSessionsResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `AssociatedID param.Field[string]` Query param: ID of the meeting that sessions should be associated with - `EndTime param.Field[Time]` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `Participants param.Field[string]` Query param - `PerPage param.Field[float64]` Query param: Number of results per page - `Search param.Field[string]` Query param: Search string that matches sessions based on meeting title, meeting ID, and session ID - `SortBy param.Field[SessionGetSessionsParamsSortBy]` Query param - `const SessionGetSessionsParamsSortByMinutesConsumed SessionGetSessionsParamsSortBy = "minutesConsumed"` - `const SessionGetSessionsParamsSortByCreatedAt SessionGetSessionsParamsSortBy = "createdAt"` - `SortOrder param.Field[SessionGetSessionsParamsSortOrder]` Query param - `const SessionGetSessionsParamsSortOrderAsc SessionGetSessionsParamsSortOrder = "ASC"` - `const SessionGetSessionsParamsSortOrderDesc SessionGetSessionsParamsSortOrder = "DESC"` - `StartTime param.Field[Time]` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `Status param.Field[SessionGetSessionsParamsStatus]` Query param - `const SessionGetSessionsParamsStatusLive SessionGetSessionsParamsStatus = "LIVE"` - `const SessionGetSessionsParamsStatusEnded SessionGetSessionsParamsStatus = "ENDED"` ### Returns - `type SessionGetSessionsResponse struct{…}` - `Data SessionGetSessionsResponseData` - `Sessions []SessionGetSessionsResponseDataSession` - `ID string` ID of the session - `AssociatedID 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` - `CreatedAt string` timestamp when session created - `LiveParticipants float64` number of participants currently in the session - `MaxConcurrentParticipants float64` number of maximum participants that were in the session - `MeetingDisplayName string` Title of the meeting this session belongs to - `MinutesConsumed float64` number of minutes consumed since the session started - `OrganizationID string` App id that hosted this session - `StartedAt string` timestamp when session started - `Status SessionGetSessionsResponseDataSessionsStatus` current status of session - `const SessionGetSessionsResponseDataSessionsStatusLive SessionGetSessionsResponseDataSessionsStatus = "LIVE"` - `const SessionGetSessionsResponseDataSessionsStatusEnded SessionGetSessionsResponseDataSessionsStatus = "ENDED"` - `Type SessionGetSessionsResponseDataSessionsType` type of session - `const SessionGetSessionsResponseDataSessionsTypeMeeting SessionGetSessionsResponseDataSessionsType = "meeting"` - `const SessionGetSessionsResponseDataSessionsTypeLivestream SessionGetSessionsResponseDataSessionsType = "livestream"` - `const SessionGetSessionsResponseDataSessionsTypeParticipant SessionGetSessionsResponseDataSessionsType = "participant"` - `UpdatedAt string` timestamp when session was last updated - `BreakoutRooms []unknown` - `EndedAt string` timestamp when session ended - `Meta unknown` Any meta data about session. - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessions( context.TODO(), "app_id", realtime_kit.SessionGetSessionsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, sessionID, params) (*SessionGetSessionDetailsResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `IncludeBreakoutRooms param.Field[bool]` Query param: List all breakout rooms ### Returns - `type SessionGetSessionDetailsResponse struct{…}` - `Data SessionGetSessionDetailsResponseData` - `Session SessionGetSessionDetailsResponseDataSession` - `ID string` ID of the session - `AssociatedID 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` - `CreatedAt string` timestamp when session created - `LiveParticipants float64` number of participants currently in the session - `MaxConcurrentParticipants float64` number of maximum participants that were in the session - `MeetingDisplayName string` Title of the meeting this session belongs to - `MinutesConsumed float64` number of minutes consumed since the session started - `OrganizationID string` App id that hosted this session - `StartedAt string` timestamp when session started - `Status SessionGetSessionDetailsResponseDataSessionStatus` current status of session - `const SessionGetSessionDetailsResponseDataSessionStatusLive SessionGetSessionDetailsResponseDataSessionStatus = "LIVE"` - `const SessionGetSessionDetailsResponseDataSessionStatusEnded SessionGetSessionDetailsResponseDataSessionStatus = "ENDED"` - `Type SessionGetSessionDetailsResponseDataSessionType` type of session - `const SessionGetSessionDetailsResponseDataSessionTypeMeeting SessionGetSessionDetailsResponseDataSessionType = "meeting"` - `const SessionGetSessionDetailsResponseDataSessionTypeLivestream SessionGetSessionDetailsResponseDataSessionType = "livestream"` - `const SessionGetSessionDetailsResponseDataSessionTypeParticipant SessionGetSessionDetailsResponseDataSessionType = "participant"` - `UpdatedAt string` timestamp when session was last updated - `BreakoutRooms []unknown` - `EndedAt string` timestamp when session ended - `Meta unknown` Any meta data about session. - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessionDetails( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionDetailsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, sessionID, params) (*SessionGetSessionParticipantsResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `IncludePeerEvents param.Field[bool]` Query param: if true, response includes all the peer events of participants. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[float64]` Query param: Number of results per page - `Search param.Field[string]` Query param: The search query string. You can search using the meeting ID or title. - `SortBy param.Field[SessionGetSessionParticipantsParamsSortBy]` Query param - `const SessionGetSessionParticipantsParamsSortByJoinedAt SessionGetSessionParticipantsParamsSortBy = "joinedAt"` - `const SessionGetSessionParticipantsParamsSortByDuration SessionGetSessionParticipantsParamsSortBy = "duration"` - `SortOrder param.Field[SessionGetSessionParticipantsParamsSortOrder]` Query param - `const SessionGetSessionParticipantsParamsSortOrderAsc SessionGetSessionParticipantsParamsSortOrder = "ASC"` - `const SessionGetSessionParticipantsParamsSortOrderDesc SessionGetSessionParticipantsParamsSortOrder = "DESC"` - `View param.Field[SessionGetSessionParticipantsParamsView]` 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. - `const SessionGetSessionParticipantsParamsViewRaw SessionGetSessionParticipantsParamsView = "raw"` - `const SessionGetSessionParticipantsParamsViewConsolidated SessionGetSessionParticipantsParamsView = "consolidated"` ### Returns - `type SessionGetSessionParticipantsResponse struct{…}` - `Data SessionGetSessionParticipantsResponseData` - `Participants []SessionGetSessionParticipantsResponseDataParticipant` - `ID string` Participant ID. This maps to the corresponding peerId. - `CreatedAt string` timestamp when this participant was created. - `CustomParticipantID string` ID passed by client to create this participant. - `DisplayName string` Display name of participant when joining the session. - `Duration float64` number of minutes for which the participant was in the session. - `JoinedAt string` timestamp at which participant joined the session. - `LeftAt string` timestamp at which participant left the session. - `PresetName string` Name of the preset associated with the participant. - `UpdatedAt string` timestamp when this participant's data was last updated. - `UserID string` User id for this participant. - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessionParticipants( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionParticipantsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, sessionID, participantID, params) (*SessionGetSessionParticipantDetailsResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Filters param.Field[SessionGetSessionParticipantDetailsParamsFilters]` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `const SessionGetSessionParticipantDetailsParamsFiltersDeviceInfo SessionGetSessionParticipantDetailsParamsFilters = "device_info"` - `const SessionGetSessionParticipantDetailsParamsFiltersIPInformation SessionGetSessionParticipantDetailsParamsFilters = "ip_information"` - `const SessionGetSessionParticipantDetailsParamsFiltersPrecallNetworkInformation SessionGetSessionParticipantDetailsParamsFilters = "precall_network_information"` - `const SessionGetSessionParticipantDetailsParamsFiltersEvents SessionGetSessionParticipantDetailsParamsFilters = "events"` - `const SessionGetSessionParticipantDetailsParamsFiltersQualityStats SessionGetSessionParticipantDetailsParamsFilters = "quality_stats"` - `IncludePeerEvents param.Field[bool]` Query param: if true, response includes all the peer events of participant. ### Returns - `type SessionGetSessionParticipantDetailsResponse struct{…}` - `Data SessionGetSessionParticipantDetailsResponseData` - `Participant SessionGetSessionParticipantDetailsResponseDataParticipant` - `ID string` Participant ID. This maps to the corresponding peerId. - `CreatedAt string` timestamp when this participant was created. - `CustomParticipantID string` ID passed by client to create this participant. - `DisplayName string` Display name of participant when joining the session. - `Duration float64` number of minutes for which the participant was in the session. - `JoinedAt string` timestamp at which participant joined the session. - `LeftAt string` timestamp at which participant left the session. - `PeerStats SessionGetSessionParticipantDetailsResponseDataParticipantPeerStats` - `Config string` - `DeviceInfo SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsDeviceInfo` - `Browser string` - `BrowserVersion string` - `CPUs float64` - `Engine string` - `IsMobile bool` - `Memory float64` - `OS string` - `OSVersion string` - `SDKName string` - `SDKVersion string` - `UserAgent string` - `WebglSupport string` - `Events []SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsEvent` - `Timestamp string` - `Type string` - `IPInformation SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsIPInformation` - `City string` - `Country string` - `IPLocation string` - `IPV4 string` - `Org string` - `Portal string` - `Region string` - `Timezone string` - `PrecallNetworkInformation SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsPrecallNetworkInformation` - `BackendRTT float64` - `EffectiveNetworktype string` - `FractionalLoss float64` - `Jitter float64` - `ReflexiveConnectivity bool` - `RelayConnectivity bool` - `RTT float64` - `Throughtput float64` - `TURNConnectivity bool` - `Status string` - `PresetName string` Name of the preset associated with the participant. - `QualityStats []SessionGetSessionParticipantDetailsResponseDataParticipantQualityStat` - `AudioBandwidth float64` - `AudioPacketLoss float64` - `AudioStats []SessionGetSessionParticipantDetailsResponseDataParticipantQualityStatsAudioStat` - `ConcealmentEvents float64` - `Jitter float64` - `PacketsLost float64` - `Quality float64` - `Timestamp string` - `AverageQuality float64` - `End string` - `PeerID string` - `Start string` - `VideoBandwidth float64` - `VideoPacketLoss float64` - `VideoStats []SessionGetSessionParticipantDetailsResponseDataParticipantQualityStatsVideoStat` - `FrameHeight float64` - `FrameWidth float64` - `FramesDropped float64` - `FramesPerSecond float64` - `Jitter float64` - `PacketsLost float64` - `Quality float64` - `Timestamp string` - `UpdatedAt string` timestamp when this participant's data was last updated. - `UserID string` User id for this participant. - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessionParticipantDetails( context.TODO(), "app_id", "session_id", "participant_id", realtime_kit.SessionGetSessionParticipantDetailsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, sessionID, query) (*SessionGetSessionChatResponse, error)` **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` - `query SessionGetSessionChatParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type SessionGetSessionChatResponse struct{…}` - `Data SessionGetSessionChatResponseData` - `ChatDownloadURL string` URL where the chat logs can be downloaded - `ChatDownloadURLExpiry string` Time when the download URL will expire - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessionChat( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionChatParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, sessionID, query) (*SessionGetSessionTranscriptsResponse, error)` **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` - `query SessionGetSessionTranscriptsParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type SessionGetSessionTranscriptsResponse struct{…}` - `Data SessionGetSessionTranscriptsResponseData` - `SessionID string` - `TranscriptDownloadURL string` URL where the transcript can be downloaded - `TranscriptDownloadURLExpiry string` Time when the download URL will expire - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessionTranscripts( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionTranscriptsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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(ctx, appID, sessionID, query) (*SessionGetSessionSummaryResponse, error)` **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` - `query SessionGetSessionSummaryParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type SessionGetSessionSummaryResponse struct{…}` - `Data SessionGetSessionSummaryResponseData` - `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 bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetSessionSummary( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionSummaryParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "sessionId": "sessionId", "summaryDownloadUrl": "summaryDownloadUrl", "summaryDownloadUrlExpiry": "summaryDownloadUrlExpiry" }, "success": true } ``` ## Generate summary of Transcripts for the session `client.RealtimeKit.Sessions.GenerateSummaryOfTranscripts(ctx, appID, sessionID, body) error` **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` - `body SessionGenerateSummaryOfTranscriptsParams` - `AccountID param.Field[string]` The account identifier tag. ### Example ```go package main import ( "context" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) err := client.RealtimeKit.Sessions.GenerateSummaryOfTranscripts( context.TODO(), "app_id", "session_id", realtime_kit.SessionGenerateSummaryOfTranscriptsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } } ``` ## Fetch details of peer `client.RealtimeKit.Sessions.GetParticipantDataFromPeerID(ctx, appID, peerID, params) (*SessionGetParticipantDataFromPeerIDResponse, error)` **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` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Filters param.Field[SessionGetParticipantDataFromPeerIDParamsFilters]` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `const SessionGetParticipantDataFromPeerIDParamsFiltersDeviceInfo SessionGetParticipantDataFromPeerIDParamsFilters = "device_info"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersIPInformation SessionGetParticipantDataFromPeerIDParamsFilters = "ip_information"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersPrecallNetworkInformation SessionGetParticipantDataFromPeerIDParamsFilters = "precall_network_information"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersEvents SessionGetParticipantDataFromPeerIDParamsFilters = "events"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersQualityStats SessionGetParticipantDataFromPeerIDParamsFilters = "quality_stats"` ### Returns - `type SessionGetParticipantDataFromPeerIDResponse struct{…}` - `Data SessionGetParticipantDataFromPeerIDResponseData` - `Participant SessionGetParticipantDataFromPeerIDResponseDataParticipant` - `ID string` - `CreatedAt string` - `CustomParticipantID string` - `DisplayName string` - `Duration float64` - `JoinedAt string` - `LeftAt string` - `PeerReport SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReport` - `Metadata SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadata` - `AudioDevicesUpdates []unknown` - `BrowserMetadata SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataBrowserMetadata` - `Browser string` - `BrowserVersion string` - `Engine string` - `UserAgent string` - `WebglSupport string` - `CandidatePairs SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataCandidatePairs` - `ConsumingTransport []unknown` - `ProducingTransport []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataCandidatePairsProducingTransport` - `AvailableOutgoingBitrate int64` - `BytesDiscardedOnSend int64` - `BytesReceived int64` - `BytesSent int64` - `CurrentRoundTripTime float64` - `LastPacketReceivedTimestamp int64` - `LastPacketSentTimestamp int64` - `LocalCandidateAddress string` - `LocalCandidateID string` - `LocalCandidateNetworkType string` - `LocalCandidatePort int64` - `LocalCandidateProtocol string` - `LocalCandidateRelatedAddress string` - `LocalCandidateRelatedPort int64` - `LocalCandidateType string` - `Nominated bool` - `PacketsDiscardedOnSend int64` - `PacketsReceived int64` - `PacketsSent int64` - `RemoteCandidateAddress string` - `RemoteCandidateID string` - `RemoteCandidatePort int64` - `RemoteCandidateProtocol string` - `RemoteCandidateType string` - `TotalRoundTripTime float64` - `DeviceInfo SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataDeviceInfo` - `CPUs int64` - `IsMobile bool` - `OS string` - `OSVersion string` - `Events []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataEvent` - `Name string` - `Timestamp string` - `IPInformation SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataIPInformation` - `ASN SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataIPInformationASN` - `ASN string` - `City string` - `Country string` - `IPV4 string` - `Region string` - `Timezone string` - `PcMetadata []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataPcMetadata` - `EffectiveNetworkType string` - `ReflexiveConnectivity bool` - `RelayConnectivity bool` - `Timestamp string` - `TURNConnectivity bool` - `RoomViewType string` - `SDKName string` - `SDKVersion string` - `SelectedDeviceUpdates []unknown` - `SpeakerDevicesUpdates []unknown` - `VideoDevicesUpdates []unknown` - `Quality SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQuality` - `AudioConsumer []unknown` - `AudioConsumerCumulative unknown` - `AudioProducer []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducer` - `BytesSent int64` - `Jitter int64` - `Mid string` - `MosQuality int64` - `PacketsLost int64` - `PacketsSent int64` - `ProducerID string` - `RTT float64` - `Ssrc int64` - `Timestamp string` - `AudioProducerCumulative SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulative` - `PacketLoss SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulativePacketLoss` - `Number10OrGreaterEventFraction int64` - `Number25OrGreaterEventFraction int64` - `Number5OrGreaterEventFraction int64` - `Number50OrGreaterEventFraction int64` - `Avg int64` - `QualityMos SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulativeQualityMos` - `Avg int64` - `P50 int64` - `P75 int64` - `P90 int64` - `RTT SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulativeRTT` - `Number100msOrGreaterEventFraction float64` - `Number250msOrGreaterEventFraction float64` - `Number500msOrGreaterEventFraction float64` - `Avg float64` - `ScreenshareAudioConsumer []unknown` - `ScreenshareAudioConsumerCumulative unknown` - `ScreenshareAudioProducer []unknown` - `ScreenshareAudioProducerCumulative unknown` - `ScreenshareVideoConsumer []unknown` - `ScreenshareVideoConsumerCumulative unknown` - `ScreenshareVideoProducer []unknown` - `ScreenshareVideoProducerCumulative unknown` - `VideoConsumer []unknown` - `VideoConsumerCumulative unknown` - `VideoProducer []unknown` - `VideoProducerCumulative unknown` - `PeerStats SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStats` - `DeviceInfo SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsDeviceInfo` - `Browser string` - `BrowserVersion string` - `CPUs int64` - `Engine string` - `IsMobile bool` - `OS string` - `OSVersion string` - `SDKName string` - `SDKVersion string` - `UserAgent string` - `WebglSupport string` - `Events []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEvent` - `Metadata SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadata` - `ConnectionInfo SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfo` - `BackendRTT float64` - `Connectivity SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoConnectivity` - `Host bool` - `Reflexive bool` - `Relay bool` - `EffectiveNetworkType string` - `FractionalLoss int64` - `IPDetails SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoIPDetails` - `ASN SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoIPDetailsASN` - `ASN string` - `City string` - `Country string` - `IP string` - `LOC string` - `Postal string` - `Region string` - `Timezone string` - `Jitter int64` - `Location SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoLocation` - `Coords SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoLocationCoords` - `Latitude float64` - `Longitude float64` - `RTT float64` - `Throughput int64` - `TURNConnectivity bool` - `Timestamp string` - `Type string` - `IPInformation SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsIPInformation` - `ASN SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsIPInformationASN` - `ASN string` - `City string` - `Country string` - `IPLocation string` - `IPV4 string` - `Org string` - `Region string` - `Timezone string` - `PrecallNetworkInformation SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsPrecallNetworkInformation` - `BackendRTT float64` - `EffectiveNetworktype string` - `FractionalLoss int64` - `Jitter int64` - `ReflexiveConnectivity bool` - `RelayConnectivity bool` - `RTT float64` - `Throughput int64` - `TURNConnectivity bool` - `QualityStats SessionGetParticipantDataFromPeerIDResponseDataParticipantQualityStats` - `AudioBandwidth int64` - `AudioStats []unknown` - `AverageQuality int64` - `End string` - `FirstAudioPacketReceived string` - `FirstVideoPacketReceived string` - `LastAudioPacketReceived string` - `LastVideoPacketReceived string` - `PeerIDs []string` - `Start string` - `TotalAudioPackets int64` - `TotalAudioPacketsLost int64` - `TotalVideoPackets int64` - `TotalVideoPacketsLost int64` - `VideoBandwidth int64` - `VideoStats []unknown` - `Role string` - `UpdatedAt string` - `UserID string` - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Sessions.GetParticipantDataFromPeerID( context.TODO(), "app_id", "peer_id", realtime_kit.SessionGetParticipantDataFromPeerIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 } ```