# Realtime Kit # Apps ## Fetch all apps `realtime_kit.apps.get(AppGetParams**kwargs) -> AppGetResponse` **get** `/accounts/{account_id}/realtime/kit/apps` Fetch all apps for your account ### Parameters - `account_id: str` The account identifier tag. ### Returns - `class AppGetResponse: …` - `data: Optional[List[Data]]` - `id: Optional[str]` - `created_at: Optional[str]` - `name: Optional[str]` - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) app = client.realtime_kit.apps.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(app.data) ``` #### Response ```json { "data": [ { "created_at": "2025-01-01T08:16:40.644Z", "id": "my-app-id", "name": "my-first-app" } ], "success": true } ``` ## Create App `realtime_kit.apps.post(AppPostParams**kwargs) -> AppPostResponse` **post** `/accounts/{account_id}/realtime/kit/apps` Create new app for your account ### Parameters - `account_id: str` - `name: str` ### Returns - `class AppPostResponse: …` - `data: Optional[Data]` - `app: Optional[DataApp]` - `id: Optional[str]` - `created_at: Optional[str]` - `name: Optional[str]` - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.apps.post( account_id="account_id", name="name", ) print(response.data) ``` #### Response ```json { "data": { "app": { "created_at": "2025-01-01T08:16:40.644Z", "id": "my-app-id", "name": "my-new-app" } }, "success": true } ``` ## Domain Types ### App Get Response - `class AppGetResponse: …` - `data: Optional[List[Data]]` - `id: Optional[str]` - `created_at: Optional[str]` - `name: Optional[str]` - `success: Optional[bool]` ### App Post Response - `class AppPostResponse: …` - `data: Optional[Data]` - `app: Optional[DataApp]` - `id: Optional[str]` - `created_at: Optional[str]` - `name: Optional[str]` - `success: Optional[bool]` # Meetings ## Fetch all meetings for an App `realtime_kit.meetings.get(strapp_id, MeetingGetParams**kwargs) -> MeetingGetResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings` Returns all meetings for the given App ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `end_time: Optional[Union[str, datetime]]` The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `page_no: Optional[float]` The page number from which you want your page search results to be displayed. - `per_page: Optional[float]` Number of results per page - `search: Optional[str]` The search query string. You can search using the meeting ID or title. - `start_time: Optional[Union[str, datetime]]` The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. ### Returns - `class MeetingGetResponse: …` - `data: List[Data]` - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) meeting = client.realtime_kit.meetings.get( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(meeting.data) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Create a meeting `realtime_kit.meetings.create(strapp_id, MeetingCreateParams**kwargs) -> MeetingCreateResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings` Create a meeting for the given App ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `ai_config: Optional[AIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[AIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[AIConfigTranscription]` Transcription Configurations - `keywords: Optional[SequenceNotStr[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[RecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[RecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[RecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[RecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[RecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[RecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[RecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[RecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting ### Returns - `class MeetingCreateResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) meeting = client.realtime_kit.meetings.create( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(meeting.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Fetch a meeting for an App `realtime_kit.meetings.get_meeting_by_id(strmeeting_id, MeetingGetMeetingByIDParams**kwargs) -> MeetingGetMeetingByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Returns a meeting details in an App for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `name: Optional[str]` ### Returns - `class MeetingGetMeetingByIDResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.get_meeting_by_id( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Update a meeting `realtime_kit.meetings.update_meeting_by_id(strmeeting_id, MeetingUpdateMeetingByIDParams**kwargs) -> MeetingUpdateMeetingByIDResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Updates a meeting in an App for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `ai_config: Optional[AIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[AIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[AIConfigTranscription]` Transcription Configurations - `keywords: Optional[SequenceNotStr[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` If a meeting is updated to persist_chat, meeting chat would remain for a week within the meeting space. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting ### Returns - `class MeetingUpdateMeetingByIDResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.update_meeting_by_id( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Replace a meeting `realtime_kit.meetings.replace_meeting_by_id(strmeeting_id, MeetingReplaceMeetingByIDParams**kwargs) -> MeetingReplaceMeetingByIDResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Replaces all the details for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `ai_config: Optional[AIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[AIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[AIConfigTranscription]` Transcription Configurations - `keywords: Optional[SequenceNotStr[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[RecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[RecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[RecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[RecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[RecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[RecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[RecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[RecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting ### Returns - `class MeetingReplaceMeetingByIDResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.replace_meeting_by_id( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Fetch all participants of a meeting `realtime_kit.meetings.get_meeting_participants(strmeeting_id, MeetingGetMeetingParticipantsParams**kwargs) -> MeetingGetMeetingParticipantsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants` Returns all participants detail for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `page_no: Optional[float]` The page number from which you want your page search results to be displayed. - `per_page: Optional[float]` Number of results per page ### Returns - `class MeetingGetMeetingParticipantsResponse: …` - `data: List[Data]` - `id: str` ID of the participant. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.get_meeting_participants( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Add a participant `realtime_kit.meetings.add_participant(strmeeting_id, MeetingAddParticipantParams**kwargs) -> MeetingAddParticipantResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants` Adds a participant to the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `custom_participant_id: str` A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. - `preset_name: str` Name of the preset to apply to this participant. - `name: Optional[str]` (Optional) Name of the participant. - `picture: Optional[str]` (Optional) A URL to a picture to be used for the participant. ### Returns - `class MeetingAddParticipantResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Represents a participant. - `id: str` ID of the participant. - `token: str` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.add_participant( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", custom_participant_id="custom_participant_id", preset_name="preset_name", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "token": "token", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } } ``` ## Fetch a participant's detail `realtime_kit.meetings.get_meeting_participant(strparticipant_id, MeetingGetMeetingParticipantParams**kwargs) -> MeetingGetMeetingParticipantResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Returns a participant details for the given meeting and participant ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `participant_id: str` ### Returns - `class MeetingGetMeetingParticipantResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the participant. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.get_meeting_participant( participant_id="participant_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(response.data) ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" }, "success": true } ``` ## Edit a participant's detail `realtime_kit.meetings.edit_participant(strparticipant_id, MeetingEditParticipantParams**kwargs) -> MeetingEditParticipantResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Updates a participant's details for the given meeting and participant ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `participant_id: str` - `name: Optional[str]` (Optional) Name of the participant. - `picture: Optional[str]` (Optional) A URL to a picture to be used for the participant. - `preset_name: Optional[str]` (Optional) Name of the preset to apply to this participant. ### Returns - `class MeetingEditParticipantResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Represents a participant. - `id: str` ID of the participant. - `token: str` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.edit_participant( participant_id="participant_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "token": "token", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } } ``` ## Delete a participant `realtime_kit.meetings.delete_meeting_participant(strparticipant_id, MeetingDeleteMeetingParticipantParams**kwargs) -> MeetingDeleteMeetingParticipantResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Deletes a participant for the given meeting and participant ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `participant_id: str` ### Returns - `class MeetingDeleteMeetingParticipantResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `created_at: datetime` Timestamp this object was created at. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_id: str` ID of the preset applied to this participant. - `updated_at: datetime` Timestamp this object was updated at. The time is returned in ISO format. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.delete_meeting_participant( participant_id="participant_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z" } } ``` ## Refresh participant's authentication token `realtime_kit.meetings.refresh_participant_token(strparticipant_id, MeetingRefreshParticipantTokenParams**kwargs) -> MeetingRefreshParticipantTokenResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token` Regenerates participant's authentication token for the given meeting and participant ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `participant_id: str` ### Returns - `class MeetingRefreshParticipantTokenResponse: …` - `data: Data` Data returned by the operation - `token: str` Regenerated participant's authentication token. - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.meetings.refresh_participant_token( participant_id="participant_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(response.data) ``` #### Response ```json { "data": { "token": "token" }, "success": true } ``` ## Domain Types ### Meeting Get Response - `class MeetingGetResponse: …` - `data: List[Data]` - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Meeting Create Response - `class MeetingCreateResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Meeting Get Meeting By ID Response - `class MeetingGetMeetingByIDResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Meeting Update Meeting By ID Response - `class MeetingUpdateMeetingByIDResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Meeting Replace Meeting By ID Response - `class MeetingReplaceMeetingByIDResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `ai_config: Optional[DataAIConfig]` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `summarization: Optional[DataAIConfigSummarization]` Summary Config - `summary_type: Optional[Literal["general", "team_meeting", "sales_call", 6 more]]` Defines the style of the summary, such as general, team meeting, or sales call. - `"general"` - `"team_meeting"` - `"sales_call"` - `"client_check_in"` - `"interview"` - `"daily_standup"` - `"one_on_one_meeting"` - `"lecture"` - `"code_review"` - `text_format: Optional[Literal["plain_text", "markdown"]]` Determines the text format of the summary, such as plain text or markdown. - `"plain_text"` - `"markdown"` - `word_limit: Optional[int]` Sets the maximum number of words in the meeting summary. - `transcription: Optional[DataAIConfigTranscription]` Transcription Configurations - `keywords: Optional[List[str]]` Adds specific terms to improve accurate detection during transcription. - `language: Optional[Literal["en-US", "en-IN", "de", 7 more]]` Specifies the language code for transcription to ensure accurate results. - `"en-US"` - `"en-IN"` - `"de"` - `"hi"` - `"sv"` - `"ru"` - `"pl"` - `"el"` - `"fr"` - `"nl"` - `profanity_filter: Optional[bool]` Control the inclusion of offensive language in transcriptions. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `recording_config: Optional[DataRecordingConfig]` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `audio_config: Optional[DataRecordingConfigAudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Adds a prefix to the beginning of the file name of the recording. - `live_streaming_config: Optional[DataRecordingConfigLiveStreamingConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `max_seconds: Optional[float]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `realtimekit_bucket_config: Optional[DataRecordingConfigRealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `storage_config: Optional[DataRecordingConfigStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `video_config: Optional[DataRecordingConfigVideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[DataRecordingConfigVideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[DataRecordingConfigVideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. ### Meeting Get Meeting Participants Response - `class MeetingGetMeetingParticipantsResponse: …` - `data: List[Data]` - `id: str` ID of the participant. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Meeting Add Participant Response - `class MeetingAddParticipantResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Represents a participant. - `id: str` ID of the participant. - `token: str` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. ### Meeting Get Meeting Participant Response - `class MeetingGetMeetingParticipantResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the participant. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. - `success: bool` Success status of the operation ### Meeting Edit Participant Response - `class MeetingEditParticipantResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Represents a participant. - `id: str` ID of the participant. - `token: str` The participant's auth token that can be used for joining a meeting from the client side. - `created_at: datetime` When this object was created. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_name: str` Preset applied to the participant. - `updated_at: datetime` When this object was updated. The time is returned in ISO format. - `name: Optional[str]` Name of the participant. - `picture: Optional[str]` URL to a picture of the participant. ### Meeting Delete Meeting Participant Response - `class MeetingDeleteMeetingParticipantResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `created_at: datetime` Timestamp this object was created at. The time is returned in ISO format. - `custom_participant_id: str` A unique participant ID generated by the client. - `preset_id: str` ID of the preset applied to this participant. - `updated_at: datetime` Timestamp this object was updated at. The time is returned in ISO format. ### Meeting Refresh Participant Token Response - `class MeetingRefreshParticipantTokenResponse: …` - `data: Data` Data returned by the operation - `token: str` Regenerated participant's authentication token. - `success: bool` Success status of the operation # Presets ## Fetch all presets `realtime_kit.presets.get(strapp_id, PresetGetParams**kwargs) -> PresetGetResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/presets` Fetches all the presets belonging to an App. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `page_no: Optional[float]` The page number from which you want your page search results to be displayed. - `per_page: Optional[float]` Number of results per page ### Returns - `class PresetGetResponse: …` - `data: List[Data]` - `id: Optional[str]` ID of the preset - `created_at: Optional[datetime]` Timestamp this preset was created at - `name: Optional[str]` Name of the preset - `updated_at: Optional[datetime]` Timestamp this preset was last updated - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) preset = client.realtime_kit.presets.get( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(preset.data) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Create a preset `realtime_kit.presets.create(strapp_id, PresetCreateParams**kwargs) -> PresetCreateResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/presets` Creates a preset belonging to the current App ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `config: Config` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: ConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: ConfigMedia` Media configuration options. eg: Video quality - `screenshare: ConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: ConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[ConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: UI` - `design_tokens: UIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: UIDesignTokensColors` - `background: UIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: UIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[Permissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: PermissionsChat` Chat permissions - `private: PermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: PermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: PermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: PermissionsMedia` Media permissions - `audio: PermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: PermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: PermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: PermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: PermissionsPluginsConfig` - `str` - `class PermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: PermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` ### Returns - `class PresetCreateResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) preset = client.realtime_kit.presets.create( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", config={ "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0, }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd", }, "video": { "frame_rate": 30, "quality": "hd", }, }, "view_type": "GROUP_CALL", }, name="name", ui={ "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "_600": "600", "_700": "700", "_800": "800", "_900": "900", "_1000": "1000", }, "brand": { "_300": "300", "_400": "400", "_500": "500", "_600": "600", "_700": "700", }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning", }, "logo": "logo", "spacing_base": 0, "theme": "dark", } }, ) print(preset.data) ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Fetch details of a preset `realtime_kit.presets.get_preset_by_id(strpreset_id, PresetGetPresetByIDParams**kwargs) -> PresetGetPresetByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Fetches details of a preset using the provided preset ID ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `preset_id: str` ### Returns - `class PresetGetPresetByIDResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.presets.get_preset_by_id( preset_id="preset_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Delete a preset `realtime_kit.presets.delete(strpreset_id, PresetDeleteParams**kwargs) -> PresetDeleteResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Deletes a preset using the provided preset ID ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `preset_id: str` ### Returns - `class PresetDeleteResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) preset = client.realtime_kit.presets.delete( preset_id="preset_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(preset.data) ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Update a preset `realtime_kit.presets.update(strpreset_id, PresetUpdateParams**kwargs) -> PresetUpdateResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Update a preset by the provided preset ID ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `preset_id: str` - `config: Optional[Config]` - `max_screenshare_count: Optional[int]` Maximum number of screen shares that can be active at a given time - `max_video_streams: Optional[ConfigMaxVideoStreams]` Maximum number of streams that are visible on a device - `desktop: Optional[int]` Maximum number of video streams visible on desktop devices - `mobile: Optional[int]` Maximum number of streams visible on mobile devices - `media: Optional[ConfigMedia]` Media configuration options. eg: Video quality - `screenshare: Optional[ConfigMediaScreenshare]` Configuration options for participant screen shares - `frame_rate: Optional[int]` Frame rate of screen share - `quality: Optional[Literal["hd", "vga", "qvga"]]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: Optional[ConfigMediaVideo]` Configuration options for participant videos - `frame_rate: Optional[int]` Frame rate of participants' video - `quality: Optional[Literal["hd", "vga", "qvga"]]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `view_type: Optional[Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: Optional[str]` Name of the preset - `permissions: Optional[Permissions]` - `accept_waiting_requests: Optional[bool]` Whether this participant can accept waiting requests - `can_accept_production_requests: Optional[bool]` - `can_change_participant_permissions: Optional[bool]` - `can_edit_display_name: Optional[bool]` - `can_livestream: Optional[bool]` - `can_record: Optional[bool]` - `can_spotlight: Optional[bool]` - `chat: Optional[PermissionsChat]` Chat permissions - `private: Optional[PermissionsChatPrivate]` - `can_receive: Optional[bool]` - `can_send: Optional[bool]` - `files: Optional[bool]` - `text: Optional[bool]` - `public: Optional[PermissionsChatPublic]` - `can_send: Optional[bool]` Can send messages in general - `files: Optional[bool]` Can send file messages - `text: Optional[bool]` Can send text messages - `connected_meetings: Optional[PermissionsConnectedMeetings]` - `can_alter_connected_meetings: Optional[bool]` - `can_switch_connected_meetings: Optional[bool]` - `can_switch_to_parent_meeting: Optional[bool]` - `disable_participant_audio: Optional[bool]` - `disable_participant_screensharing: Optional[bool]` - `disable_participant_video: Optional[bool]` - `hidden_participant: Optional[bool]` Whether this participant is visible to others or not - `is_recorder: Optional[bool]` - `kick_participant: Optional[bool]` - `media: Optional[PermissionsMedia]` Media permissions - `audio: Optional[PermissionsMediaAudio]` Audio permissions - `can_produce: Optional[Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: Optional[PermissionsMediaScreenshare]` Screenshare permissions - `can_produce: Optional[Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: Optional[PermissionsMediaVideo]` Video permissions - `can_produce: Optional[Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: Optional[bool]` - `plugins: Optional[PermissionsPlugins]` Plugin permissions - `can_close: Optional[bool]` Can close plugins that are already open - `can_edit_config: Optional[bool]` Can edit plugin config - `can_start: Optional[bool]` Can start plugins - `config: Optional[PermissionsPluginsConfig]` - `str` - `class PermissionsPluginsConfigUnionMember1: …` - `access_control: Optional[Literal["FULL_ACCESS", "VIEW_ONLY"]]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: Optional[bool]` - `polls: Optional[PermissionsPolls]` Poll permissions - `can_create: Optional[bool]` Can create polls - `can_view: Optional[bool]` Can view polls - `can_vote: Optional[bool]` Can vote on polls - `recorder_type: Optional[Literal["RECORDER", "LIVESTREAMER", "NONE"]]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: Optional[bool]` - `waiting_room_type: Optional[Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `ui: Optional[UI]` - `config_diff: Optional[object]` - `design_tokens: Optional[UIDesignTokens]` - `border_radius: Optional[Literal["rounded"]]` - `"rounded"` - `border_width: Optional[Literal["thin"]]` - `"thin"` - `colors: Optional[UIDesignTokensColors]` - `background: Optional[UIDesignTokensColorsBackground]` - `_1000: Optional[str]` - `_600: Optional[str]` - `_700: Optional[str]` - `_800: Optional[str]` - `_900: Optional[str]` - `brand: Optional[UIDesignTokensColorsBrand]` - `_300: Optional[str]` - `_400: Optional[str]` - `_500: Optional[str]` - `_600: Optional[str]` - `_700: Optional[str]` - `danger: Optional[str]` - `success: Optional[str]` - `text: Optional[str]` - `text_on_brand: Optional[str]` - `video_bg: Optional[str]` - `warning: Optional[str]` - `logo: Optional[str]` - `spacing_base: Optional[float]` - `theme: Optional[Literal["dark"]]` - `"dark"` ### Returns - `class PresetUpdateResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) preset = client.realtime_kit.presets.update( preset_id="preset_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(preset.data) ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Domain Types ### Preset Get Response - `class PresetGetResponse: …` - `data: List[Data]` - `id: Optional[str]` ID of the preset - `created_at: Optional[datetime]` Timestamp this preset was created at - `name: Optional[str]` Name of the preset - `updated_at: Optional[datetime]` Timestamp this preset was last updated - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Preset Create Response - `class PresetCreateResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Preset Get Preset By ID Response - `class PresetGetPresetByIDResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Preset Delete Response - `class PresetDeleteResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation ### Preset Update Response - `class PresetUpdateResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the preset - `config: DataConfig` - `max_screenshare_count: int` Maximum number of screen shares that can be active at a given time - `max_video_streams: DataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `desktop: int` Maximum number of video streams visible on desktop devices - `mobile: int` Maximum number of streams visible on mobile devices - `media: DataConfigMedia` Media configuration options. eg: Video quality - `screenshare: DataConfigMediaScreenshare` Configuration options for participant screen shares - `frame_rate: int` Frame rate of screen share - `quality: Literal["hd", "vga", "qvga"]` Quality of screen share - `"hd"` - `"vga"` - `"qvga"` - `video: DataConfigMediaVideo` Configuration options for participant videos - `frame_rate: int` Frame rate of participants' video - `quality: Literal["hd", "vga", "qvga"]` Video quality of participants - `"hd"` - `"vga"` - `"qvga"` - `audio: Optional[DataConfigMediaAudio]` Control options for Audio quality. - `enable_high_bitrate: Optional[bool]` Enable High Quality Audio for your meetings - `enable_stereo: Optional[bool]` Enable Stereo for your meetings - `view_type: Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM"]` Type of the meeting - `"GROUP_CALL"` - `"WEBINAR"` - `"AUDIO_ROOM"` - `name: str` Name of the preset - `ui: DataUI` - `design_tokens: DataUIDesignTokens` - `border_radius: Literal["rounded"]` - `"rounded"` - `border_width: Literal["thin"]` - `"thin"` - `colors: DataUIDesignTokensColors` - `background: DataUIDesignTokensColorsBackground` - `_1000: str` - `_600: str` - `_700: str` - `_800: str` - `_900: str` - `brand: DataUIDesignTokensColorsBrand` - `_300: str` - `_400: str` - `_500: str` - `_600: str` - `_700: str` - `danger: str` - `success: str` - `text: str` - `text_on_brand: str` - `video_bg: str` - `warning: str` - `logo: str` - `spacing_base: float` - `theme: Literal["dark"]` - `"dark"` - `config_diff: Optional[object]` - `permissions: Optional[DataPermissions]` - `accept_waiting_requests: bool` Whether this participant can accept waiting requests - `can_accept_production_requests: bool` - `can_change_participant_permissions: bool` - `can_edit_display_name: bool` - `can_livestream: bool` - `can_record: bool` - `can_spotlight: bool` - `chat: DataPermissionsChat` Chat permissions - `private: DataPermissionsChatPrivate` - `can_receive: bool` - `can_send: bool` - `files: bool` - `text: bool` - `public: DataPermissionsChatPublic` - `can_send: bool` Can send messages in general - `files: bool` Can send file messages - `text: bool` Can send text messages - `connected_meetings: DataPermissionsConnectedMeetings` - `can_alter_connected_meetings: bool` - `can_switch_connected_meetings: bool` - `can_switch_to_parent_meeting: bool` - `disable_participant_audio: bool` - `disable_participant_screensharing: bool` - `disable_participant_video: bool` - `hidden_participant: bool` Whether this participant is visible to others or not - `kick_participant: bool` - `media: DataPermissionsMedia` Media permissions - `audio: DataPermissionsMediaAudio` Audio permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce audio - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `screenshare: DataPermissionsMediaScreenshare` Screenshare permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce screen share video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `video: DataPermissionsMediaVideo` Video permissions - `can_produce: Literal["ALLOWED", "NOT_ALLOWED", "CAN_REQUEST"]` Can produce video - `"ALLOWED"` - `"NOT_ALLOWED"` - `"CAN_REQUEST"` - `pin_participant: bool` - `plugins: DataPermissionsPlugins` Plugin permissions - `can_close: bool` Can close plugins that are already open - `can_edit_config: bool` Can edit plugin config - `can_start: bool` Can start plugins - `config: DataPermissionsPluginsConfig` - `str` - `class DataPermissionsPluginsConfigUnionMember1: …` - `access_control: Literal["FULL_ACCESS", "VIEW_ONLY"]` - `"FULL_ACCESS"` - `"VIEW_ONLY"` - `handles_view_only: bool` - `polls: DataPermissionsPolls` Poll permissions - `can_create: bool` Can create polls - `can_view: bool` Can view polls - `can_vote: bool` Can vote on polls - `recorder_type: Literal["RECORDER", "LIVESTREAMER", "NONE"]` Type of the recording peer - `"RECORDER"` - `"LIVESTREAMER"` - `"NONE"` - `show_participant_list: bool` - `waiting_room_type: Literal["SKIP", "ON_PRIVILEGED_USER_ENTRY", "SKIP_ON_ACCEPT"]` Waiting room type - `"SKIP"` - `"ON_PRIVILEGED_USER_ENTRY"` - `"SKIP_ON_ACCEPT"` - `is_recorder: Optional[bool]` - `success: bool` Success status of the operation # Sessions ## Fetch all sessions of an App `realtime_kit.sessions.get_sessions(strapp_id, SessionGetSessionsParams**kwargs) -> SessionGetSessionsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions` Returns details of all sessions of an App. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `associated_id: Optional[str]` ID of the meeting that sessions should be associated with - `end_time: Optional[Union[str, datetime]]` The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `page_no: Optional[float]` The page number from which you want your page search results to be displayed. - `participants: Optional[str]` - `per_page: Optional[float]` Number of results per page - `search: Optional[str]` Search string that matches sessions based on meeting title, meeting ID, and session ID - `sort_by: Optional[Literal["minutesConsumed", "createdAt"]]` - `"minutesConsumed"` - `"createdAt"` - `sort_order: Optional[Literal["ASC", "DESC"]]` - `"ASC"` - `"DESC"` - `start_time: Optional[Union[str, datetime]]` The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `status: Optional[Literal["LIVE", "ENDED"]]` - `"LIVE"` - `"ENDED"` ### Returns - `class SessionGetSessionsResponse: …` - `data: Optional[Data]` - `sessions: Optional[List[DataSession]]` - `id: str` ID of the session - `associated_id: str` 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: str` timestamp when session created - `live_participants: float` number of participants currently in the session - `max_concurrent_participants: float` number of maximum participants that were in the session - `meeting_display_name: str` Title of the meeting this session belongs to - `minutes_consumed: float` number of minutes consumed since the session started - `organization_id: str` App id that hosted this session - `started_at: str` timestamp when session started - `status: Literal["LIVE", "ENDED"]` current status of session - `"LIVE"` - `"ENDED"` - `type: Literal["meeting", "livestream", "participant"]` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: str` timestamp when session was last updated - `breakout_rooms: Optional[List[object]]` - `ended_at: Optional[str]` timestamp when session ended - `meta: Optional[object]` Any meta data about session. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_sessions( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(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 `realtime_kit.sessions.get_session_details(strsession_id, SessionGetSessionDetailsParams**kwargs) -> SessionGetSessionDetailsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}` Returns data of the given session ID including recording details. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` - `include_breakout_rooms: Optional[bool]` List all breakout rooms ### Returns - `class SessionGetSessionDetailsResponse: …` - `data: Optional[Data]` - `session: Optional[DataSession]` - `id: str` ID of the session - `associated_id: str` 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: str` timestamp when session created - `live_participants: float` number of participants currently in the session - `max_concurrent_participants: float` number of maximum participants that were in the session - `meeting_display_name: str` Title of the meeting this session belongs to - `minutes_consumed: float` number of minutes consumed since the session started - `organization_id: str` App id that hosted this session - `started_at: str` timestamp when session started - `status: Literal["LIVE", "ENDED"]` current status of session - `"LIVE"` - `"ENDED"` - `type: Literal["meeting", "livestream", "participant"]` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: str` timestamp when session was last updated - `breakout_rooms: Optional[List[object]]` - `ended_at: Optional[str]` timestamp when session ended - `meta: Optional[object]` Any meta data about session. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_session_details( session_id="session_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 `realtime_kit.sessions.get_session_participants(strsession_id, SessionGetSessionParticipantsParams**kwargs) -> SessionGetSessionParticipantsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants` Returns a list of participants for the given session ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` - `include_peer_events: Optional[bool]` if true, response includes all the peer events of participants. - `page_no: Optional[float]` The page number from which you want your page search results to be displayed. - `per_page: Optional[float]` Number of results per page - `search: Optional[str]` The search query string. You can search using the meeting ID or title. - `sort_by: Optional[Literal["joinedAt", "duration"]]` - `"joinedAt"` - `"duration"` - `sort_order: Optional[Literal["ASC", "DESC"]]` - `"ASC"` - `"DESC"` - `view: Optional[Literal["raw", "consolidated"]]` 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 - `class SessionGetSessionParticipantsResponse: …` - `data: Optional[Data]` - `participants: Optional[List[DataParticipant]]` - `id: Optional[str]` Participant ID. This maps to the corresponding peerId. - `created_at: Optional[str]` timestamp when this participant was created. - `custom_participant_id: Optional[str]` ID passed by client to create this participant. - `display_name: Optional[str]` Display name of participant when joining the session. - `duration: Optional[float]` number of minutes for which the participant was in the session. - `joined_at: Optional[str]` timestamp at which participant joined the session. - `left_at: Optional[str]` timestamp at which participant left the session. - `preset_name: Optional[str]` Name of the preset associated with the participant. - `updated_at: Optional[str]` timestamp when this participant's data was last updated. - `user_id: Optional[str]` User id for this participant. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_session_participants( session_id="session_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 `realtime_kit.sessions.get_session_participant_details(strparticipant_id, SessionGetSessionParticipantDetailsParams**kwargs) -> 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 - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` - `participant_id: str` - `filters: Optional[Literal["device_info", "ip_information", "precall_network_information", 2 more]]` 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: Optional[bool]` if true, response includes all the peer events of participant. ### Returns - `class SessionGetSessionParticipantDetailsResponse: …` - `data: Optional[Data]` - `participant: Optional[DataParticipant]` - `id: Optional[str]` Participant ID. This maps to the corresponding peerId. - `created_at: Optional[str]` timestamp when this participant was created. - `custom_participant_id: Optional[str]` ID passed by client to create this participant. - `display_name: Optional[str]` Display name of participant when joining the session. - `duration: Optional[float]` number of minutes for which the participant was in the session. - `joined_at: Optional[str]` timestamp at which participant joined the session. - `left_at: Optional[str]` timestamp at which participant left the session. - `peer_stats: Optional[DataParticipantPeerStats]` - `config: Optional[str]` - `device_info: Optional[DataParticipantPeerStatsDeviceInfo]` - `browser: Optional[str]` - `browser_version: Optional[str]` - `cpus: Optional[float]` - `engine: Optional[str]` - `is_mobile: Optional[bool]` - `memory: Optional[float]` - `os: Optional[str]` - `os_version: Optional[str]` - `sdk_name: Optional[str]` - `sdk_version: Optional[str]` - `user_agent: Optional[str]` - `webgl_support: Optional[str]` - `events: Optional[List[DataParticipantPeerStatsEvent]]` - `timestamp: Optional[str]` - `type: Optional[str]` - `ip_information: Optional[DataParticipantPeerStatsIPInformation]` - `city: Optional[str]` - `country: Optional[str]` - `ip_location: Optional[str]` - `ipv4: Optional[str]` - `org: Optional[str]` - `portal: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation]` - `backend_rtt: Optional[float]` - `effective_networktype: Optional[str]` - `fractional_loss: Optional[float]` - `jitter: Optional[float]` - `reflexive_connectivity: Optional[bool]` - `relay_connectivity: Optional[bool]` - `rtt: Optional[float]` - `throughtput: Optional[float]` - `turn_connectivity: Optional[bool]` - `status: Optional[str]` - `preset_name: Optional[str]` Name of the preset associated with the participant. - `quality_stats: Optional[List[DataParticipantQualityStat]]` - `audio_bandwidth: Optional[float]` - `audio_packet_loss: Optional[float]` - `audio_stats: Optional[List[DataParticipantQualityStatAudioStat]]` - `concealment_events: Optional[float]` - `jitter: Optional[float]` - `packets_lost: Optional[float]` - `quality: Optional[float]` - `timestamp: Optional[str]` - `average_quality: Optional[float]` - `end: Optional[str]` - `peer_id: Optional[str]` - `start: Optional[str]` - `video_bandwidth: Optional[float]` - `video_packet_loss: Optional[float]` - `video_stats: Optional[List[DataParticipantQualityStatVideoStat]]` - `frame_height: Optional[float]` - `frame_width: Optional[float]` - `frames_dropped: Optional[float]` - `frames_per_second: Optional[float]` - `jitter: Optional[float]` - `packets_lost: Optional[float]` - `quality: Optional[float]` - `timestamp: Optional[str]` - `updated_at: Optional[str]` timestamp when this participant's data was last updated. - `user_id: Optional[str]` User id for this participant. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_session_participant_details( participant_id="participant_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", session_id="session_id", ) print(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 `realtime_kit.sessions.get_session_chat(strsession_id, SessionGetSessionChatParams**kwargs) -> 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 - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` ### Returns - `class SessionGetSessionChatResponse: …` - `data: Optional[Data]` - `chat_download_url: str` URL where the chat logs can be downloaded - `chat_download_url_expiry: str` Time when the download URL will expire - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_session_chat( session_id="session_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 `realtime_kit.sessions.get_session_transcripts(strsession_id, SessionGetSessionTranscriptsParams**kwargs) -> 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 - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` ### Returns - `class SessionGetSessionTranscriptsResponse: …` - `data: Optional[Data]` - `session_id: str` - `transcript_download_url: str` URL where the transcript can be downloaded - `transcript_download_url_expiry: str` Time when the download URL will expire - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_session_transcripts( session_id="session_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 `realtime_kit.sessions.get_session_summary(strsession_id, SessionGetSessionSummaryParams**kwargs) -> 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 - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` ### Returns - `class SessionGetSessionSummaryResponse: …` - `data: Optional[Data]` - `session_id: str` - `summary_download_url: str` URL where the summary of transcripts can be downloaded - `summary_download_url_expiry: str` Time of Expiry before when you need to download the csv file. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_session_summary( session_id="session_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "sessionId": "sessionId", "summaryDownloadUrl": "summaryDownloadUrl", "summaryDownloadUrlExpiry": "summaryDownloadUrlExpiry" }, "success": true } ``` ## Generate summary of Transcripts for the session `realtime_kit.sessions.generate_summary_of_transcripts(strsession_id, SessionGenerateSummaryOfTranscriptsParams**kwargs)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Trigger Summary generation of Transcripts for the session ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `session_id: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) client.realtime_kit.sessions.generate_summary_of_transcripts( session_id="session_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) ``` ## Fetch details of peer `realtime_kit.sessions.get_participant_data_from_peer_id(strpeer_id, SessionGetParticipantDataFromPeerIDParams**kwargs) -> 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 - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `peer_id: str` - `filters: Optional[Literal["device_info", "ip_information", "precall_network_information", 2 more]]` 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 - `class SessionGetParticipantDataFromPeerIDResponse: …` - `data: Optional[Data]` - `participant: Optional[DataParticipant]` - `id: Optional[str]` - `created_at: Optional[str]` - `custom_participant_id: Optional[str]` - `display_name: Optional[str]` - `duration: Optional[float]` - `joined_at: Optional[str]` - `left_at: Optional[str]` - `peer_report: Optional[DataParticipantPeerReport]` - `metadata: Optional[DataParticipantPeerReportMetadata]` - `audio_devices_updates: Optional[List[object]]` - `browser_metadata: Optional[DataParticipantPeerReportMetadataBrowserMetadata]` - `browser: Optional[str]` - `browser_version: Optional[str]` - `engine: Optional[str]` - `user_agent: Optional[str]` - `webgl_support: Optional[str]` - `candidate_pairs: Optional[DataParticipantPeerReportMetadataCandidatePairs]` - `consuming_transport: Optional[List[object]]` - `producing_transport: Optional[List[DataParticipantPeerReportMetadataCandidatePairsProducingTransport]]` - `available_outgoing_bitrate: Optional[int]` - `bytes_discarded_on_send: Optional[int]` - `bytes_received: Optional[int]` - `bytes_sent: Optional[int]` - `current_round_trip_time: Optional[float]` - `last_packet_received_timestamp: Optional[int]` - `last_packet_sent_timestamp: Optional[int]` - `local_candidate_address: Optional[str]` - `local_candidate_id: Optional[str]` - `local_candidate_network_type: Optional[str]` - `local_candidate_port: Optional[int]` - `local_candidate_protocol: Optional[str]` - `local_candidate_related_address: Optional[str]` - `local_candidate_related_port: Optional[int]` - `local_candidate_type: Optional[str]` - `nominated: Optional[bool]` - `packets_discarded_on_send: Optional[int]` - `packets_received: Optional[int]` - `packets_sent: Optional[int]` - `remote_candidate_address: Optional[str]` - `remote_candidate_id: Optional[str]` - `remote_candidate_port: Optional[int]` - `remote_candidate_protocol: Optional[str]` - `remote_candidate_type: Optional[str]` - `total_round_trip_time: Optional[float]` - `device_info: Optional[DataParticipantPeerReportMetadataDeviceInfo]` - `cpus: Optional[int]` - `is_mobile: Optional[bool]` - `os: Optional[str]` - `os_version: Optional[str]` - `events: Optional[List[DataParticipantPeerReportMetadataEvent]]` - `name: Optional[str]` - `timestamp: Optional[str]` - `ip_information: Optional[DataParticipantPeerReportMetadataIPInformation]` - `asn: Optional[DataParticipantPeerReportMetadataIPInformationASN]` - `asn: Optional[str]` - `city: Optional[str]` - `country: Optional[str]` - `ipv4: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `pc_metadata: Optional[List[DataParticipantPeerReportMetadataPcMetadata]]` - `effective_network_type: Optional[str]` - `reflexive_connectivity: Optional[bool]` - `relay_connectivity: Optional[bool]` - `timestamp: Optional[str]` - `turn_connectivity: Optional[bool]` - `room_view_type: Optional[str]` - `sdk_name: Optional[str]` - `sdk_version: Optional[str]` - `selected_device_updates: Optional[List[object]]` - `speaker_devices_updates: Optional[List[object]]` - `video_devices_updates: Optional[List[object]]` - `quality: Optional[DataParticipantPeerReportQuality]` - `audio_consumer: Optional[List[object]]` - `audio_consumer_cumulative: Optional[object]` - `audio_producer: Optional[List[DataParticipantPeerReportQualityAudioProducer]]` - `bytes_sent: Optional[int]` - `jitter: Optional[int]` - `mid: Optional[str]` - `mos_quality: Optional[int]` - `packets_lost: Optional[int]` - `packets_sent: Optional[int]` - `producer_id: Optional[str]` - `rtt: Optional[float]` - `ssrc: Optional[int]` - `timestamp: Optional[str]` - `audio_producer_cumulative: Optional[DataParticipantPeerReportQualityAudioProducerCumulative]` - `packet_loss: Optional[DataParticipantPeerReportQualityAudioProducerCumulativePacketLoss]` - `_10_or_greater_event_fraction: Optional[int]` - `_25_or_greater_event_fraction: Optional[int]` - `_5_or_greater_event_fraction: Optional[int]` - `_50_or_greater_event_fraction: Optional[int]` - `avg: Optional[int]` - `quality_mos: Optional[DataParticipantPeerReportQualityAudioProducerCumulativeQualityMos]` - `avg: Optional[int]` - `p50: Optional[int]` - `p75: Optional[int]` - `p90: Optional[int]` - `rtt: Optional[DataParticipantPeerReportQualityAudioProducerCumulativeRTT]` - `_100ms_or_greater_event_fraction: Optional[float]` - `_250ms_or_greater_event_fraction: Optional[float]` - `_500ms_or_greater_event_fraction: Optional[float]` - `avg: Optional[float]` - `screenshare_audio_consumer: Optional[List[object]]` - `screenshare_audio_consumer_cumulative: Optional[object]` - `screenshare_audio_producer: Optional[List[object]]` - `screenshare_audio_producer_cumulative: Optional[object]` - `screenshare_video_consumer: Optional[List[object]]` - `screenshare_video_consumer_cumulative: Optional[object]` - `screenshare_video_producer: Optional[List[object]]` - `screenshare_video_producer_cumulative: Optional[object]` - `video_consumer: Optional[List[object]]` - `video_consumer_cumulative: Optional[object]` - `video_producer: Optional[List[object]]` - `video_producer_cumulative: Optional[object]` - `peer_stats: Optional[DataParticipantPeerStats]` - `device_info: Optional[DataParticipantPeerStatsDeviceInfo]` - `browser: Optional[str]` - `browser_version: Optional[str]` - `cpus: Optional[int]` - `engine: Optional[str]` - `is_mobile: Optional[bool]` - `os: Optional[str]` - `os_version: Optional[str]` - `sdk_name: Optional[str]` - `sdk_version: Optional[str]` - `user_agent: Optional[str]` - `webgl_support: Optional[str]` - `events: Optional[List[DataParticipantPeerStatsEvent]]` - `metadata: Optional[DataParticipantPeerStatsEventMetadata]` - `connection_info: Optional[DataParticipantPeerStatsEventMetadataConnectionInfo]` - `backend_r_t_t: Optional[float]` - `connectivity: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoConnectivity]` - `host: Optional[bool]` - `reflexive: Optional[bool]` - `relay: Optional[bool]` - `effective_network_type: Optional[str]` - `fractional_loss: Optional[int]` - `ip_details: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoIPDetails]` - `asn: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoIPDetailsASN]` - `asn: Optional[str]` - `city: Optional[str]` - `country: Optional[str]` - `ip: Optional[str]` - `loc: Optional[str]` - `postal: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `jitter: Optional[int]` - `location: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoLocation]` - `coords: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoLocationCoords]` - `latitude: Optional[float]` - `longitude: Optional[float]` - `r_t_t: Optional[float]` - `throughput: Optional[int]` - `turn_connectivity: Optional[bool]` - `timestamp: Optional[str]` - `type: Optional[str]` - `ip_information: Optional[DataParticipantPeerStatsIPInformation]` - `asn: Optional[DataParticipantPeerStatsIPInformationASN]` - `asn: Optional[str]` - `city: Optional[str]` - `country: Optional[str]` - `ip_location: Optional[str]` - `ipv4: Optional[str]` - `org: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation]` - `backend_rtt: Optional[float]` - `effective_networktype: Optional[str]` - `fractional_loss: Optional[int]` - `jitter: Optional[int]` - `reflexive_connectivity: Optional[bool]` - `relay_connectivity: Optional[bool]` - `rtt: Optional[float]` - `throughput: Optional[int]` - `turn_connectivity: Optional[bool]` - `quality_stats: Optional[DataParticipantQualityStats]` - `audio_bandwidth: Optional[int]` - `audio_stats: Optional[List[object]]` - `average_quality: Optional[int]` - `end: Optional[str]` - `first_audio_packet_received: Optional[str]` - `first_video_packet_received: Optional[str]` - `last_audio_packet_received: Optional[str]` - `last_video_packet_received: Optional[str]` - `peer_ids: Optional[List[str]]` - `start: Optional[str]` - `total_audio_packets: Optional[int]` - `total_audio_packets_lost: Optional[int]` - `total_video_packets: Optional[int]` - `total_video_packets_lost: Optional[int]` - `video_bandwidth: Optional[int]` - `video_stats: Optional[List[object]]` - `role: Optional[str]` - `updated_at: Optional[str]` - `user_id: Optional[str]` - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.sessions.get_participant_data_from_peer_id( peer_id="peer_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(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 - `class SessionGetSessionsResponse: …` - `data: Optional[Data]` - `sessions: Optional[List[DataSession]]` - `id: str` ID of the session - `associated_id: str` 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: str` timestamp when session created - `live_participants: float` number of participants currently in the session - `max_concurrent_participants: float` number of maximum participants that were in the session - `meeting_display_name: str` Title of the meeting this session belongs to - `minutes_consumed: float` number of minutes consumed since the session started - `organization_id: str` App id that hosted this session - `started_at: str` timestamp when session started - `status: Literal["LIVE", "ENDED"]` current status of session - `"LIVE"` - `"ENDED"` - `type: Literal["meeting", "livestream", "participant"]` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: str` timestamp when session was last updated - `breakout_rooms: Optional[List[object]]` - `ended_at: Optional[str]` timestamp when session ended - `meta: Optional[object]` Any meta data about session. - `success: Optional[bool]` ### Session Get Session Details Response - `class SessionGetSessionDetailsResponse: …` - `data: Optional[Data]` - `session: Optional[DataSession]` - `id: str` ID of the session - `associated_id: str` 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: str` timestamp when session created - `live_participants: float` number of participants currently in the session - `max_concurrent_participants: float` number of maximum participants that were in the session - `meeting_display_name: str` Title of the meeting this session belongs to - `minutes_consumed: float` number of minutes consumed since the session started - `organization_id: str` App id that hosted this session - `started_at: str` timestamp when session started - `status: Literal["LIVE", "ENDED"]` current status of session - `"LIVE"` - `"ENDED"` - `type: Literal["meeting", "livestream", "participant"]` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: str` timestamp when session was last updated - `breakout_rooms: Optional[List[object]]` - `ended_at: Optional[str]` timestamp when session ended - `meta: Optional[object]` Any meta data about session. - `success: Optional[bool]` ### Session Get Session Participants Response - `class SessionGetSessionParticipantsResponse: …` - `data: Optional[Data]` - `participants: Optional[List[DataParticipant]]` - `id: Optional[str]` Participant ID. This maps to the corresponding peerId. - `created_at: Optional[str]` timestamp when this participant was created. - `custom_participant_id: Optional[str]` ID passed by client to create this participant. - `display_name: Optional[str]` Display name of participant when joining the session. - `duration: Optional[float]` number of minutes for which the participant was in the session. - `joined_at: Optional[str]` timestamp at which participant joined the session. - `left_at: Optional[str]` timestamp at which participant left the session. - `preset_name: Optional[str]` Name of the preset associated with the participant. - `updated_at: Optional[str]` timestamp when this participant's data was last updated. - `user_id: Optional[str]` User id for this participant. - `success: Optional[bool]` ### Session Get Session Participant Details Response - `class SessionGetSessionParticipantDetailsResponse: …` - `data: Optional[Data]` - `participant: Optional[DataParticipant]` - `id: Optional[str]` Participant ID. This maps to the corresponding peerId. - `created_at: Optional[str]` timestamp when this participant was created. - `custom_participant_id: Optional[str]` ID passed by client to create this participant. - `display_name: Optional[str]` Display name of participant when joining the session. - `duration: Optional[float]` number of minutes for which the participant was in the session. - `joined_at: Optional[str]` timestamp at which participant joined the session. - `left_at: Optional[str]` timestamp at which participant left the session. - `peer_stats: Optional[DataParticipantPeerStats]` - `config: Optional[str]` - `device_info: Optional[DataParticipantPeerStatsDeviceInfo]` - `browser: Optional[str]` - `browser_version: Optional[str]` - `cpus: Optional[float]` - `engine: Optional[str]` - `is_mobile: Optional[bool]` - `memory: Optional[float]` - `os: Optional[str]` - `os_version: Optional[str]` - `sdk_name: Optional[str]` - `sdk_version: Optional[str]` - `user_agent: Optional[str]` - `webgl_support: Optional[str]` - `events: Optional[List[DataParticipantPeerStatsEvent]]` - `timestamp: Optional[str]` - `type: Optional[str]` - `ip_information: Optional[DataParticipantPeerStatsIPInformation]` - `city: Optional[str]` - `country: Optional[str]` - `ip_location: Optional[str]` - `ipv4: Optional[str]` - `org: Optional[str]` - `portal: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation]` - `backend_rtt: Optional[float]` - `effective_networktype: Optional[str]` - `fractional_loss: Optional[float]` - `jitter: Optional[float]` - `reflexive_connectivity: Optional[bool]` - `relay_connectivity: Optional[bool]` - `rtt: Optional[float]` - `throughtput: Optional[float]` - `turn_connectivity: Optional[bool]` - `status: Optional[str]` - `preset_name: Optional[str]` Name of the preset associated with the participant. - `quality_stats: Optional[List[DataParticipantQualityStat]]` - `audio_bandwidth: Optional[float]` - `audio_packet_loss: Optional[float]` - `audio_stats: Optional[List[DataParticipantQualityStatAudioStat]]` - `concealment_events: Optional[float]` - `jitter: Optional[float]` - `packets_lost: Optional[float]` - `quality: Optional[float]` - `timestamp: Optional[str]` - `average_quality: Optional[float]` - `end: Optional[str]` - `peer_id: Optional[str]` - `start: Optional[str]` - `video_bandwidth: Optional[float]` - `video_packet_loss: Optional[float]` - `video_stats: Optional[List[DataParticipantQualityStatVideoStat]]` - `frame_height: Optional[float]` - `frame_width: Optional[float]` - `frames_dropped: Optional[float]` - `frames_per_second: Optional[float]` - `jitter: Optional[float]` - `packets_lost: Optional[float]` - `quality: Optional[float]` - `timestamp: Optional[str]` - `updated_at: Optional[str]` timestamp when this participant's data was last updated. - `user_id: Optional[str]` User id for this participant. - `success: Optional[bool]` ### Session Get Session Chat Response - `class SessionGetSessionChatResponse: …` - `data: Optional[Data]` - `chat_download_url: str` URL where the chat logs can be downloaded - `chat_download_url_expiry: str` Time when the download URL will expire - `success: Optional[bool]` ### Session Get Session Transcripts Response - `class SessionGetSessionTranscriptsResponse: …` - `data: Optional[Data]` - `session_id: str` - `transcript_download_url: str` URL where the transcript can be downloaded - `transcript_download_url_expiry: str` Time when the download URL will expire - `success: Optional[bool]` ### Session Get Session Summary Response - `class SessionGetSessionSummaryResponse: …` - `data: Optional[Data]` - `session_id: str` - `summary_download_url: str` URL where the summary of transcripts can be downloaded - `summary_download_url_expiry: str` Time of Expiry before when you need to download the csv file. - `success: Optional[bool]` ### Session Get Participant Data From Peer ID Response - `class SessionGetParticipantDataFromPeerIDResponse: …` - `data: Optional[Data]` - `participant: Optional[DataParticipant]` - `id: Optional[str]` - `created_at: Optional[str]` - `custom_participant_id: Optional[str]` - `display_name: Optional[str]` - `duration: Optional[float]` - `joined_at: Optional[str]` - `left_at: Optional[str]` - `peer_report: Optional[DataParticipantPeerReport]` - `metadata: Optional[DataParticipantPeerReportMetadata]` - `audio_devices_updates: Optional[List[object]]` - `browser_metadata: Optional[DataParticipantPeerReportMetadataBrowserMetadata]` - `browser: Optional[str]` - `browser_version: Optional[str]` - `engine: Optional[str]` - `user_agent: Optional[str]` - `webgl_support: Optional[str]` - `candidate_pairs: Optional[DataParticipantPeerReportMetadataCandidatePairs]` - `consuming_transport: Optional[List[object]]` - `producing_transport: Optional[List[DataParticipantPeerReportMetadataCandidatePairsProducingTransport]]` - `available_outgoing_bitrate: Optional[int]` - `bytes_discarded_on_send: Optional[int]` - `bytes_received: Optional[int]` - `bytes_sent: Optional[int]` - `current_round_trip_time: Optional[float]` - `last_packet_received_timestamp: Optional[int]` - `last_packet_sent_timestamp: Optional[int]` - `local_candidate_address: Optional[str]` - `local_candidate_id: Optional[str]` - `local_candidate_network_type: Optional[str]` - `local_candidate_port: Optional[int]` - `local_candidate_protocol: Optional[str]` - `local_candidate_related_address: Optional[str]` - `local_candidate_related_port: Optional[int]` - `local_candidate_type: Optional[str]` - `nominated: Optional[bool]` - `packets_discarded_on_send: Optional[int]` - `packets_received: Optional[int]` - `packets_sent: Optional[int]` - `remote_candidate_address: Optional[str]` - `remote_candidate_id: Optional[str]` - `remote_candidate_port: Optional[int]` - `remote_candidate_protocol: Optional[str]` - `remote_candidate_type: Optional[str]` - `total_round_trip_time: Optional[float]` - `device_info: Optional[DataParticipantPeerReportMetadataDeviceInfo]` - `cpus: Optional[int]` - `is_mobile: Optional[bool]` - `os: Optional[str]` - `os_version: Optional[str]` - `events: Optional[List[DataParticipantPeerReportMetadataEvent]]` - `name: Optional[str]` - `timestamp: Optional[str]` - `ip_information: Optional[DataParticipantPeerReportMetadataIPInformation]` - `asn: Optional[DataParticipantPeerReportMetadataIPInformationASN]` - `asn: Optional[str]` - `city: Optional[str]` - `country: Optional[str]` - `ipv4: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `pc_metadata: Optional[List[DataParticipantPeerReportMetadataPcMetadata]]` - `effective_network_type: Optional[str]` - `reflexive_connectivity: Optional[bool]` - `relay_connectivity: Optional[bool]` - `timestamp: Optional[str]` - `turn_connectivity: Optional[bool]` - `room_view_type: Optional[str]` - `sdk_name: Optional[str]` - `sdk_version: Optional[str]` - `selected_device_updates: Optional[List[object]]` - `speaker_devices_updates: Optional[List[object]]` - `video_devices_updates: Optional[List[object]]` - `quality: Optional[DataParticipantPeerReportQuality]` - `audio_consumer: Optional[List[object]]` - `audio_consumer_cumulative: Optional[object]` - `audio_producer: Optional[List[DataParticipantPeerReportQualityAudioProducer]]` - `bytes_sent: Optional[int]` - `jitter: Optional[int]` - `mid: Optional[str]` - `mos_quality: Optional[int]` - `packets_lost: Optional[int]` - `packets_sent: Optional[int]` - `producer_id: Optional[str]` - `rtt: Optional[float]` - `ssrc: Optional[int]` - `timestamp: Optional[str]` - `audio_producer_cumulative: Optional[DataParticipantPeerReportQualityAudioProducerCumulative]` - `packet_loss: Optional[DataParticipantPeerReportQualityAudioProducerCumulativePacketLoss]` - `_10_or_greater_event_fraction: Optional[int]` - `_25_or_greater_event_fraction: Optional[int]` - `_5_or_greater_event_fraction: Optional[int]` - `_50_or_greater_event_fraction: Optional[int]` - `avg: Optional[int]` - `quality_mos: Optional[DataParticipantPeerReportQualityAudioProducerCumulativeQualityMos]` - `avg: Optional[int]` - `p50: Optional[int]` - `p75: Optional[int]` - `p90: Optional[int]` - `rtt: Optional[DataParticipantPeerReportQualityAudioProducerCumulativeRTT]` - `_100ms_or_greater_event_fraction: Optional[float]` - `_250ms_or_greater_event_fraction: Optional[float]` - `_500ms_or_greater_event_fraction: Optional[float]` - `avg: Optional[float]` - `screenshare_audio_consumer: Optional[List[object]]` - `screenshare_audio_consumer_cumulative: Optional[object]` - `screenshare_audio_producer: Optional[List[object]]` - `screenshare_audio_producer_cumulative: Optional[object]` - `screenshare_video_consumer: Optional[List[object]]` - `screenshare_video_consumer_cumulative: Optional[object]` - `screenshare_video_producer: Optional[List[object]]` - `screenshare_video_producer_cumulative: Optional[object]` - `video_consumer: Optional[List[object]]` - `video_consumer_cumulative: Optional[object]` - `video_producer: Optional[List[object]]` - `video_producer_cumulative: Optional[object]` - `peer_stats: Optional[DataParticipantPeerStats]` - `device_info: Optional[DataParticipantPeerStatsDeviceInfo]` - `browser: Optional[str]` - `browser_version: Optional[str]` - `cpus: Optional[int]` - `engine: Optional[str]` - `is_mobile: Optional[bool]` - `os: Optional[str]` - `os_version: Optional[str]` - `sdk_name: Optional[str]` - `sdk_version: Optional[str]` - `user_agent: Optional[str]` - `webgl_support: Optional[str]` - `events: Optional[List[DataParticipantPeerStatsEvent]]` - `metadata: Optional[DataParticipantPeerStatsEventMetadata]` - `connection_info: Optional[DataParticipantPeerStatsEventMetadataConnectionInfo]` - `backend_r_t_t: Optional[float]` - `connectivity: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoConnectivity]` - `host: Optional[bool]` - `reflexive: Optional[bool]` - `relay: Optional[bool]` - `effective_network_type: Optional[str]` - `fractional_loss: Optional[int]` - `ip_details: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoIPDetails]` - `asn: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoIPDetailsASN]` - `asn: Optional[str]` - `city: Optional[str]` - `country: Optional[str]` - `ip: Optional[str]` - `loc: Optional[str]` - `postal: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `jitter: Optional[int]` - `location: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoLocation]` - `coords: Optional[DataParticipantPeerStatsEventMetadataConnectionInfoLocationCoords]` - `latitude: Optional[float]` - `longitude: Optional[float]` - `r_t_t: Optional[float]` - `throughput: Optional[int]` - `turn_connectivity: Optional[bool]` - `timestamp: Optional[str]` - `type: Optional[str]` - `ip_information: Optional[DataParticipantPeerStatsIPInformation]` - `asn: Optional[DataParticipantPeerStatsIPInformationASN]` - `asn: Optional[str]` - `city: Optional[str]` - `country: Optional[str]` - `ip_location: Optional[str]` - `ipv4: Optional[str]` - `org: Optional[str]` - `region: Optional[str]` - `timezone: Optional[str]` - `precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation]` - `backend_rtt: Optional[float]` - `effective_networktype: Optional[str]` - `fractional_loss: Optional[int]` - `jitter: Optional[int]` - `reflexive_connectivity: Optional[bool]` - `relay_connectivity: Optional[bool]` - `rtt: Optional[float]` - `throughput: Optional[int]` - `turn_connectivity: Optional[bool]` - `quality_stats: Optional[DataParticipantQualityStats]` - `audio_bandwidth: Optional[int]` - `audio_stats: Optional[List[object]]` - `average_quality: Optional[int]` - `end: Optional[str]` - `first_audio_packet_received: Optional[str]` - `first_video_packet_received: Optional[str]` - `last_audio_packet_received: Optional[str]` - `last_video_packet_received: Optional[str]` - `peer_ids: Optional[List[str]]` - `start: Optional[str]` - `total_audio_packets: Optional[int]` - `total_audio_packets_lost: Optional[int]` - `total_video_packets: Optional[int]` - `total_video_packets_lost: Optional[int]` - `video_bandwidth: Optional[int]` - `video_stats: Optional[List[object]]` - `role: Optional[str]` - `updated_at: Optional[str]` - `user_id: Optional[str]` - `success: Optional[bool]` # Recordings ## Fetch all recordings for an App `realtime_kit.recordings.get_recordings(strapp_id, RecordingGetRecordingsParams**kwargs) -> RecordingGetRecordingsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings` Returns all recordings for an App. If the `meeting_id` parameter is passed, returns all recordings for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `end_time: Optional[Union[str, datetime]]` The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `expired: Optional[bool]` If passed, only shows expired/non-expired recordings on RealtimeKit's bucket - `meeting_id: Optional[str]` ID of a meeting. Optional. Will limit results to only this meeting if passed. - `page_no: Optional[float]` The page number from which you want your page search results to be displayed. - `per_page: Optional[float]` Number of results per page - `search: Optional[str]` The search query string. You can search using the meeting ID or title. - `sort_by: Optional[Literal["invokedTime"]]` - `"invokedTime"` - `sort_order: Optional[Literal["ASC", "DESC"]]` - `"ASC"` - `"DESC"` - `start_time: Optional[Union[str, datetime]]` The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `status: Optional[List[Literal["INVOKED", "RECORDING", "UPLOADING", "UPLOADED"]]]` Filter by one or more recording status - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` ### Returns - `class RecordingGetRecordingsResponse: …` - `data: List[Data]` - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `meeting: Optional[DataMeeting]` - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. - `recording_duration: Optional[int]` Total recording time in seconds. - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.recordings.get_recordings( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.data) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "meeting": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" }, "recording_duration": 0, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Start recording a meeting `realtime_kit.recordings.start_recordings(strapp_id, RecordingStartRecordingsParams**kwargs) -> RecordingStartRecordingsResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/recordings` Starts recording a meeting. The meeting can be started by an App admin directly, or a participant with permissions to start a recording, based on the type of authorization used. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `allow_multiple_recordings: Optional[bool]` By default, a meeting allows only one recording to run at a time. Enabling the `allow_multiple_recordings` parameter to true allows you to initiate multiple recordings concurrently in the same meeting. This allows you to record separate videos of the same meeting with different configurations, such as portrait mode or landscape mode. - `audio_config: Optional[AudioConfig]` Object containing configuration regarding the audio that is being recorded. - `channel: Optional[Literal["mono", "stereo"]]` Audio signal pathway within an audio file that carries a specific sound source. - `"mono"` - `"stereo"` - `codec: Optional[Literal["MP3", "AAC"]]` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `"MP3"` - `"AAC"` - `export_file: Optional[bool]` Controls whether to export audio file seperately - `file_name_prefix: Optional[str]` Update the recording file name. - `interactive_config: Optional[InteractiveConfig]` Allows you to add timed metadata to your recordings, which are digital markers inserted into a video file to provide contextual information at specific points in the content range. The ID3 tags containing this information are available to clients on the playback timeline in HLS format. The output files are generated in a compressed .tar format. - `type: Optional[Literal["ID3"]]` The metadata is presented in the form of ID3 tags. - `"ID3"` - `max_seconds: Optional[int]` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `meeting_id: Optional[str]` ID of the meeting to record. - `realtimekit_bucket_config: Optional[RealtimekitBucketConfig]` - `enabled: bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `rtmp_out_config: Optional[RtmpOutConfig]` - `rtmp_url: Optional[str]` RTMP URL to stream to - `storage_config: Optional[StorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `url: Optional[str]` Pass a custom url to record arbitary screen - `video_config: Optional[VideoConfig]` - `codec: Optional[Literal["H264", "VP8"]]` Codec using which the recording will be encoded. - `"H264"` - `"VP8"` - `export_file: Optional[bool]` Controls whether to export video file seperately - `height: Optional[int]` Height of the recording video in pixels - `watermark: Optional[VideoConfigWatermark]` Watermark to be added to the recording - `position: Optional[Literal["left top", "right top", "left bottom", "right bottom"]]` Position of the watermark - `"left top"` - `"right top"` - `"left bottom"` - `"right bottom"` - `size: Optional[VideoConfigWatermarkSize]` Size of the watermark - `height: Optional[int]` Height of the watermark in px - `width: Optional[int]` Width of the watermark in px - `url: Optional[str]` URL of the watermark image - `width: Optional[int]` Width of the recording video in pixels ### Returns - `class RecordingStartRecordingsResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `start_reason: Optional[DataStartReason]` - `caller: Optional[DataStartReasonCaller]` - `name: Optional[str]` Name of the user who started the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who started the recording. - `reason: Optional[Literal["API_CALL", "RECORD_ON_START"]]` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason: Optional[DataStopReason]` - `caller: Optional[DataStopReasonCaller]` - `name: Optional[str]` Name of the user who stopped the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who stopped the recording. - `reason: Optional[Literal["API_CALL", "INTERNAL_ERROR", "ALL_PEERS_LEFT"]]` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.recordings.start_recordings( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", allow_multiple_recordings=False, audio_config={ "channel": "stereo", "codec": "AAC", "export_file": True, }, file_name_prefix="string", interactive_config={ "type": "ID3" }, max_seconds=60, meeting_id="97440c6a-140b-40a9-9499-b23fd7a3868a", realtimekit_bucket_config={ "enabled": True }, video_config={ "codec": "H264", "export_file": True, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1, }, "url": "http://example.com", }, "width": 1280, }, ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Fetch active recording `realtime_kit.recordings.get_active_recordings(strmeeting_id, RecordingGetActiveRecordingsParams**kwargs) -> RecordingGetActiveRecordingsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/active-recording/{meeting_id}` Returns the active recording details for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` ### Returns - `class RecordingGetActiveRecordingsResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `success: bool` Success status of the operation ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.recordings.get_active_recordings( meeting_id="meeting_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0 }, "success": true } ``` ## Fetch details of a recording `realtime_kit.recordings.get_one_recording(strrecording_id, RecordingGetOneRecordingParams**kwargs) -> RecordingGetOneRecordingResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}` Returns details of a recording for the given recording ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `recording_id: str` ### Returns - `class RecordingGetOneRecordingResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `start_reason: Optional[DataStartReason]` - `caller: Optional[DataStartReasonCaller]` - `name: Optional[str]` Name of the user who started the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who started the recording. - `reason: Optional[Literal["API_CALL", "RECORD_ON_START"]]` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason: Optional[DataStopReason]` - `caller: Optional[DataStopReasonCaller]` - `name: Optional[str]` Name of the user who stopped the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who stopped the recording. - `reason: Optional[Literal["API_CALL", "INTERNAL_ERROR", "ALL_PEERS_LEFT"]]` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.recordings.get_one_recording( recording_id="recording_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Pause/Resume/Stop recording `realtime_kit.recordings.pause_resume_stop_recording(strrecording_id, RecordingPauseResumeStopRecordingParams**kwargs) -> RecordingPauseResumeStopRecordingResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}` Pause/Resume/Stop a given recording ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` - `recording_id: str` - `action: Literal["stop", "pause", "resume"]` - `"stop"` - `"pause"` - `"resume"` ### Returns - `class RecordingPauseResumeStopRecordingResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `start_reason: Optional[DataStartReason]` - `caller: Optional[DataStartReasonCaller]` - `name: Optional[str]` Name of the user who started the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who started the recording. - `reason: Optional[Literal["API_CALL", "RECORD_ON_START"]]` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason: Optional[DataStopReason]` - `caller: Optional[DataStopReasonCaller]` - `name: Optional[str]` Name of the user who stopped the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who stopped the recording. - `reason: Optional[Literal["API_CALL", "INTERNAL_ERROR", "ALL_PEERS_LEFT"]]` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.recordings.pause_resume_stop_recording( recording_id="recording_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="2a95132c15732412d22c1476fa83f27a", action="stop", ) print(response.success) ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Start recording audio and video tracks `realtime_kit.recordings.start_track_recording(strapp_id, RecordingStartTrackRecordingParams**kwargs)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/track` Starts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the [Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview). ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `layers: Dict[str, Layers]` - `file_name_prefix: Optional[str]` A file name prefix to apply for files generated from this layer - `outputs: Optional[Iterable[LayersOutput]]` - `storage_config: Optional[LayersOutputStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `type: Optional[Literal["REALTIMEKIT_BUCKET", "STORAGE_CONFIG"]]` The type of output destination this layer is being exported to. - `"REALTIMEKIT_BUCKET"` - `"STORAGE_CONFIG"` - `meeting_id: str` ID of the meeting to record. - `max_seconds: Optional[float]` Maximum seconds this recording should be active for (beta) ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) client.realtime_kit.recordings.start_track_recording( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", layers={ "default": { "file_name_prefix": "string", "outputs": [{ "type": "REALTIMEKIT_BUCKET" }], }, "default-video": { "file_name_prefix": "string", "outputs": [{ "type": "REALTIMEKIT_BUCKET" }], }, }, meeting_id="string", max_seconds=60, ) ``` ## Domain Types ### Recording Get Recordings Response - `class RecordingGetRecordingsResponse: …` - `data: List[Data]` - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `meeting: Optional[DataMeeting]` - `id: str` ID of the meeting. - `created_at: datetime` Timestamp the object was created at. The time is returned in ISO format. - `updated_at: datetime` Timestamp the object was updated at. The time is returned in ISO format. - `live_stream_on_start: Optional[bool]` Specifies if the meeting should start getting livestreamed on start. - `persist_chat: Optional[bool]` Specifies if Chat within a meeting should persist for a week. - `record_on_start: Optional[bool]` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `session_keep_alive_time_in_secs: Optional[float]` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `status: Optional[Literal["ACTIVE", "INACTIVE"]]` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `"ACTIVE"` - `"INACTIVE"` - `summarize_on_end: Optional[bool]` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `title: Optional[str]` Title of the meeting. - `recording_duration: Optional[int]` Total recording time in seconds. - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium - `paging: Paging` - `end_offset: float` - `start_offset: float` - `total_count: float` - `success: bool` ### Recording Start Recordings Response - `class RecordingStartRecordingsResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `start_reason: Optional[DataStartReason]` - `caller: Optional[DataStartReasonCaller]` - `name: Optional[str]` Name of the user who started the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who started the recording. - `reason: Optional[Literal["API_CALL", "RECORD_ON_START"]]` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason: Optional[DataStopReason]` - `caller: Optional[DataStopReasonCaller]` - `name: Optional[str]` Name of the user who stopped the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who stopped the recording. - `reason: Optional[Literal["API_CALL", "INTERNAL_ERROR", "ALL_PEERS_LEFT"]]` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium ### Recording Get Active Recordings Response - `class RecordingGetActiveRecordingsResponse: …` - `data: Data` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `success: bool` Success status of the operation ### Recording Get One Recording Response - `class RecordingGetOneRecordingResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `start_reason: Optional[DataStartReason]` - `caller: Optional[DataStartReasonCaller]` - `name: Optional[str]` Name of the user who started the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who started the recording. - `reason: Optional[Literal["API_CALL", "RECORD_ON_START"]]` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason: Optional[DataStopReason]` - `caller: Optional[DataStopReasonCaller]` - `name: Optional[str]` Name of the user who stopped the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who stopped the recording. - `reason: Optional[Literal["API_CALL", "INTERNAL_ERROR", "ALL_PEERS_LEFT"]]` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium ### Recording Pause Resume Stop Recording Response - `class RecordingPauseResumeStopRecordingResponse: …` - `success: bool` Success status of the operation - `data: Optional[Data]` Data returned by the operation - `id: str` ID of the recording - `audio_download_url: Optional[str]` If the audio_config is passed, the URL for downloading the audio recording is returned. - `download_url: Optional[str]` URL where the recording can be downloaded. - `download_url_expiry: Optional[datetime]` Timestamp when the download URL expires. - `file_size: Optional[float]` File size of the recording, in bytes. - `invoked_time: datetime` Timestamp when this recording was invoked. - `output_file_name: str` File name of the recording. - `session_id: Optional[str]` ID of the meeting session this recording is for. - `started_time: Optional[datetime]` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `status: Literal["INVOKED", "RECORDING", "UPLOADING", 3 more]` Current status of the recording. - `"INVOKED"` - `"RECORDING"` - `"UPLOADING"` - `"UPLOADED"` - `"ERRORED"` - `"PAUSED"` - `stopped_time: Optional[datetime]` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `recording_duration: Optional[int]` Total recording time in seconds. - `start_reason: Optional[DataStartReason]` - `caller: Optional[DataStartReasonCaller]` - `name: Optional[str]` Name of the user who started the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who started the recording. - `reason: Optional[Literal["API_CALL", "RECORD_ON_START"]]` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `"API_CALL"` - `"RECORD_ON_START"` - `stop_reason: Optional[DataStopReason]` - `caller: Optional[DataStopReasonCaller]` - `name: Optional[str]` Name of the user who stopped the recording. - `type: Optional[Literal["ORGANIZATION", "USER"]]` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `"ORGANIZATION"` - `"USER"` - `user_id: Optional[str]` The user ID of the person who stopped the recording. - `reason: Optional[Literal["API_CALL", "INTERNAL_ERROR", "ALL_PEERS_LEFT"]]` Specifies the reason why the recording stopped. - `"API_CALL"` - `"INTERNAL_ERROR"` - `"ALL_PEERS_LEFT"` - `storage_config: Optional[DataStorageConfig]` - `type: Literal["aws", "azure", "digitalocean", 2 more]` Type of storage media. - `"aws"` - `"azure"` - `"digitalocean"` - `"gcs"` - `"sftp"` - `access_key: Optional[str]` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `auth_method: Optional[Literal["KEY", "PASSWORD"]]` Authentication method used for "sftp" type storage medium - `"KEY"` - `"PASSWORD"` - `bucket: Optional[str]` Name of the storage medium's bucket. - `host: Optional[str]` SSH destination server host for SFTP type storage medium - `password: Optional[str]` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `path: Optional[str]` Path relative to the bucket root at which the recording will be placed. - `port: Optional[float]` SSH destination server port for SFTP type storage medium - `private_key: Optional[str]` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `region: Optional[str]` Region of the storage medium. - `secret: Optional[str]` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `username: Optional[str]` SSH destination server username for SFTP type storage medium # Webhooks ## Fetch all webhooks details `realtime_kit.webhooks.get_webhooks(strapp_id, WebhookGetWebhooksParams**kwargs) -> WebhookGetWebhooksResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Returns details of all webhooks for an App. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. ### Returns - `class WebhookGetWebhooksResponse: …` - `data: List[Data]` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.get_webhooks( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.data) ``` #### Response ```json { "data": [ { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" } ], "success": true } ``` ## Add a webhook `realtime_kit.webhooks.create_webhook(strapp_id, WebhookCreateWebhookParams**kwargs) -> WebhookCreateWebhookResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Adds a new webhook to an App. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events that this webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `url: str` URL this webhook will send events to - `enabled: Optional[bool]` Set whether or not the webhook should be active when created ### Returns - `class WebhookCreateWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.create_webhook( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", events=["meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary"], name="All events webhook", url="https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e", ) print(response.data) ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Fetch details of a webhook `realtime_kit.webhooks.get_webhook_by_id(strwebhook_id, WebhookGetWebhookByIDParams**kwargs) -> WebhookGetWebhookByIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Returns webhook details for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` ### Returns - `class WebhookGetWebhookByIDResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.get_webhook_by_id( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Replace a webhook `realtime_kit.webhooks.replace_webhook(strwebhook_id, WebhookReplaceWebhookParams**kwargs) -> WebhookReplaceWebhookResponse` **put** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Replace all details for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events that this webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `url: str` URL this webhook will send events to - `enabled: Optional[bool]` Set whether or not the webhook should be active when created ### Returns - `class WebhookReplaceWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.replace_webhook( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", events=["meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary"], name="All events webhook", url="https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e", ) print(response.data) ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Edit a webhook `realtime_kit.webhooks.edit_webhook(strwebhook_id, WebhookEditWebhookParams**kwargs) -> WebhookEditWebhookResponse` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Edits the webhook details for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` - `enabled: Optional[bool]` - `events: Optional[List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]]` Events that the webhook will get triggered by - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.chatSynced"` - `"meeting.transcript"` - `"meeting.summary"` - `name: Optional[str]` Name of the webhook - `url: Optional[str]` URL the webhook will send events to ### Returns - `class WebhookEditWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.edit_webhook( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Delete a webhook `realtime_kit.webhooks.delete_webhook(strwebhook_id, WebhookDeleteWebhookParams**kwargs) -> WebhookDeleteWebhookResponse` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Removes a webhook for the given webhook ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `webhook_id: str` ### Returns - `class WebhookDeleteWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.webhooks.delete_webhook( webhook_id="webhook_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Domain Types ### Webhook Get Webhooks Response - `class WebhookGetWebhooksResponse: …` - `data: List[Data]` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Create Webhook Response - `class WebhookCreateWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Get Webhook By ID Response - `class WebhookGetWebhookByIDResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Replace Webhook Response - `class WebhookReplaceWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Edit Webhook Response - `class WebhookEditWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` ### Webhook Delete Webhook Response - `class WebhookDeleteWebhookResponse: …` - `data: Data` - `id: str` ID of the webhook - `created_at: datetime` Timestamp when this webhook was created - `enabled: bool` Set to true if the webhook is active - `events: List[Literal["meeting.started", "meeting.ended", "meeting.participantJoined", 6 more]]` Events this webhook will send updates for - `"meeting.started"` - `"meeting.ended"` - `"meeting.participantJoined"` - `"meeting.participantLeft"` - `"meeting.chatSynced"` - `"recording.statusUpdate"` - `"livestreaming.statusUpdate"` - `"meeting.transcript"` - `"meeting.summary"` - `name: str` Name of the webhook - `updated_at: datetime` Timestamp when this webhook was updated - `url: str` URL the webhook will send events to - `success: bool` # Active Session ## Fetch details of an active session `realtime_kit.active_session.get_active_session(strmeeting_id, ActiveSessionGetActiveSessionParams**kwargs) -> ActiveSessionGetActiveSessionResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session` Returns details of an ongoing active session for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` ### Returns - `class ActiveSessionGetActiveSessionResponse: …` - `data: Optional[Data]` - `id: str` ID of the session - `associated_id: str` 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: str` timestamp when session created - `live_participants: float` number of participants currently in the session - `max_concurrent_participants: float` number of maximum participants that were in the session - `meeting_display_name: str` Title of the meeting this session belongs to - `minutes_consumed: float` number of minutes consumed since the session started - `organization_id: str` App id that hosted this session - `started_at: str` timestamp when session started - `status: Literal["LIVE", "ENDED"]` current status of session - `"LIVE"` - `"ENDED"` - `type: Literal["meeting", "livestream", "participant"]` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: str` timestamp when session was last updated - `breakout_rooms: Optional[List[object]]` - `ended_at: Optional[str]` timestamp when session ended - `meta: Optional[object]` Any meta data about session. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.active_session.get_active_session( meeting_id="meeting_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "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 } ``` ## Kick participants from an active session `realtime_kit.active_session.kick_participants(strmeeting_id, ActiveSessionKickParticipantsParams**kwargs) -> ActiveSessionKickParticipantsResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick` Kicks one or more participants from an active session using user ID or custom participant ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `custom_participant_ids: SequenceNotStr[str]` - `participant_ids: SequenceNotStr[str]` ### Returns - `class ActiveSessionKickParticipantsResponse: …` - `data: Optional[Data]` - `action: Optional[str]` - `participants: Optional[List[DataParticipant]]` - `id: str` ID of the session participant - `created_at: str` - `updated_at: str` - `email: Optional[str]` Email of the session participant. - `name: Optional[str]` Name of the session participant. - `picture: Optional[str]` A URL pointing to a picture of the participant. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.active_session.kick_participants( meeting_id="meeting_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", custom_participant_ids=["string"], participant_ids=["string"], ) print(response.data) ``` #### Response ```json { "data": { "action": "action", "participants": [ { "id": "id", "created_at": "created_at", "updated_at": "updated_at", "email": "email", "name": "name", "picture": "picture" } ] }, "success": true } ``` ## Kick all participants `realtime_kit.active_session.kick_all_participants(strmeeting_id, ActiveSessionKickAllParticipantsParams**kwargs) -> ActiveSessionKickAllParticipantsResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick-all` Kicks all participants from an active session for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` ### Returns - `class ActiveSessionKickAllParticipantsResponse: …` - `data: Optional[Data]` - `action: Optional[str]` - `kicked_participants_count: Optional[float]` - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.active_session.kick_all_participants( meeting_id="meeting_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "action": "action", "kicked_participants_count": 0 }, "success": true } ``` ## Create a poll `realtime_kit.active_session.create_poll(strmeeting_id, ActiveSessionCreatePollParams**kwargs) -> ActiveSessionCreatePollResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/poll` Creates a new poll in an active session for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `options: SequenceNotStr[str]` Different options for the question - `question: str` Question of the poll - `anonymous: Optional[bool]` if voters on a poll are anonymous - `hide_votes: Optional[bool]` if votes on an option are visible before a person votes ### Returns - `class ActiveSessionCreatePollResponse: …` - `data: Optional[Data]` - `action: Optional[str]` - `poll: Optional[DataPoll]` - `id: str` ID of the poll - `options: List[DataPollOption]` Answer options - `count: float` - `text: str` Text of the answer option - `votes: List[DataPollOptionVote]` - `id: str` - `name: str` - `question: str` Question asked by the poll - `anonymous: Optional[bool]` - `created_by: Optional[str]` - `hide_votes: Optional[bool]` - `voted: Optional[List[str]]` - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.active_session.create_poll( meeting_id="meeting_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", options=["string"], question="question", ) print(response.data) ``` #### Response ```json { "data": { "action": "action", "poll": { "id": "id", "options": [ { "count": 0, "text": "text", "votes": [ { "id": "id", "name": "name" } ] } ], "question": "question", "anonymous": true, "created_by": "created_by", "hide_votes": true, "voted": [ "string" ] } }, "success": true } ``` ## Domain Types ### Active Session Get Active Session Response - `class ActiveSessionGetActiveSessionResponse: …` - `data: Optional[Data]` - `id: str` ID of the session - `associated_id: str` 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: str` timestamp when session created - `live_participants: float` number of participants currently in the session - `max_concurrent_participants: float` number of maximum participants that were in the session - `meeting_display_name: str` Title of the meeting this session belongs to - `minutes_consumed: float` number of minutes consumed since the session started - `organization_id: str` App id that hosted this session - `started_at: str` timestamp when session started - `status: Literal["LIVE", "ENDED"]` current status of session - `"LIVE"` - `"ENDED"` - `type: Literal["meeting", "livestream", "participant"]` type of session - `"meeting"` - `"livestream"` - `"participant"` - `updated_at: str` timestamp when session was last updated - `breakout_rooms: Optional[List[object]]` - `ended_at: Optional[str]` timestamp when session ended - `meta: Optional[object]` Any meta data about session. - `success: Optional[bool]` ### Active Session Kick Participants Response - `class ActiveSessionKickParticipantsResponse: …` - `data: Optional[Data]` - `action: Optional[str]` - `participants: Optional[List[DataParticipant]]` - `id: str` ID of the session participant - `created_at: str` - `updated_at: str` - `email: Optional[str]` Email of the session participant. - `name: Optional[str]` Name of the session participant. - `picture: Optional[str]` A URL pointing to a picture of the participant. - `success: Optional[bool]` ### Active Session Kick All Participants Response - `class ActiveSessionKickAllParticipantsResponse: …` - `data: Optional[Data]` - `action: Optional[str]` - `kicked_participants_count: Optional[float]` - `success: Optional[bool]` ### Active Session Create Poll Response - `class ActiveSessionCreatePollResponse: …` - `data: Optional[Data]` - `action: Optional[str]` - `poll: Optional[DataPoll]` - `id: str` ID of the poll - `options: List[DataPollOption]` Answer options - `count: float` - `text: str` Text of the answer option - `votes: List[DataPollOptionVote]` - `id: str` - `name: str` - `question: str` Question asked by the poll - `anonymous: Optional[bool]` - `created_by: Optional[str]` - `hide_votes: Optional[bool]` - `voted: Optional[List[str]]` - `success: Optional[bool]` # Livestreams ## Create an independent livestream `realtime_kit.livestreams.create_independent_livestream(strapp_id, LivestreamCreateIndependentLivestreamParams**kwargs) -> LivestreamCreateIndependentLivestreamResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams` Creates a livestream for the given App ID and returns ingest server, stream key, and playback URL. You can pass custom input to the ingest server and stream key, and freely distribute the content using the playback URL on any player that supports HLS/LHLS. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `name: Optional[str]` Name of the livestream ### Returns - `class LivestreamCreateIndependentLivestreamResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `disabled: Optional[bool]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder should send the video and audio data. - `meeting_id: Optional[str]` - `name: Optional[str]` - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.create_independent_livestream( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="prdmmp-xhycsl", ) print(response.data) ``` #### Response ```json { "data": { "disabled": false, "id": "78dd0b50-4147-4bb8-88d3-2ccc2e98bff0", "ingest_server": "rtmps://live.cloudflare.com:443/live/", "meeting_id": null, "name": "Livestreaming-Demo", "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8", "status": "INVOKED", "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4" }, "success": true } ``` ## Fetch all livestreams `realtime_kit.livestreams.get_all_livestreams(strapp_id, LivestreamGetAllLivestreamsParams**kwargs) -> LivestreamGetAllLivestreamsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams` Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the `exclude_meetings` query parameter. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `end_time: Optional[Union[str, datetime]]` Specify the end time range in ISO format to access the live stream. - `exclude_meetings: Optional[bool]` Exclude the RealtimeKit meetings that are livestreamed. - `page_no: Optional[int]` The page number from which you want your page search results to be displayed. - `per_page: Optional[int]` Number of results per page. - `sort_order: Optional[Literal["ASC", "DSC"]]` Specifies the sorting order for the results. - `"ASC"` - `"DSC"` - `start_time: Optional[Union[str, datetime]]` Specify the start time range in ISO format to access the live stream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` Specifies the status of the operation. - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` ### Returns - `class LivestreamGetAllLivestreamsResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The ID of the livestream. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` ID of the meeting. - `name: Optional[str]` Name of the livestream. - `paging: Optional[DataPaging]` - `end_offset: Optional[int]` - `start_offset: Optional[int]` - `total_count: Optional[int]` - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_all_livestreams( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.data) ``` #### Response ```json { "data": { "id": "3fd739f4-3c41-456e-bfba-6ebd51e16d2d", "created_at": "2023-07-15T11:48:34.753Z", "disabled": "disabled", "ingest_server": "rtmps://live.cloudflare.com:443/live/", "meeting_id": "meeting_id", "name": "test", "paging": { "end_offset": 1, "start_offset": 1, "total_count": 1 }, "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8", "status": "LIVE", "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4", "updated_at": "2023-07-15T11:48:34.753Z" }, "success": true } ``` ## Stop livestreaming a meeting `realtime_kit.livestreams.stop_livestreaming_a_meeting(strmeeting_id, LivestreamStopLivestreamingAMeetingParams**kwargs) -> LivestreamStopLivestreamingAMeetingResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream/stop` Stops the active livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` ### Returns - `class LivestreamStopLivestreamingAMeetingResponse: …` - `data: Optional[Data]` - `message: Optional[str]` - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.stop_livestreaming_a_meeting( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "message": "Stopped live stream successfully" }, "success": true } ``` ## Start livestreaming a meeting `realtime_kit.livestreams.start_livestreaming_a_meeting(strmeeting_id, LivestreamStartLivestreamingAMeetingParams**kwargs) -> LivestreamStartLivestreamingAMeetingResponse` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/livestreams` Starts livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` - `name: Optional[str]` - `video_config: Optional[VideoConfig]` - `height: Optional[int]` Height of the livestreaming video in pixels - `width: Optional[int]` Width of the livestreaming video in pixels ### Returns - `class LivestreamStartLivestreamingAMeetingResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.start_livestreaming_a_meeting( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", name="prdmmp-xhycsl", ) print(response.data) ``` #### Response ```json { "data": { "id": "7088bba8-f522-49a8-b59b-3cd0e946bbb0", "ingest_server": "rtmps://live.cloudflare.com:443/live/", "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8", "status": "INVOKED", "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4" }, "success": true } ``` ## Fetch complete analytics data for your livestreams `realtime_kit.livestreams.get_livestream_analytics_complete(strapp_id, LivestreamGetLivestreamAnalyticsCompleteParams**kwargs) -> LivestreamGetLivestreamAnalyticsCompleteResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/overall` Returns livestream analytics for the specified time range. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `end_time: Optional[Union[str, datetime]]` Specify the end time range in ISO format to access the livestream analytics. - `start_time: Optional[Union[str, datetime]]` Specify the start time range in ISO format to access the livestream analytics. ### Returns - `class LivestreamGetLivestreamAnalyticsCompleteResponse: …` - `data: Optional[Data]` - `count: Optional[int]` Count of total livestreams. - `total_ingest_seconds: Optional[int]` Total time duration for which the input was given or the meeting was streamed. - `total_viewer_seconds: Optional[int]` Total view time for which the viewers watched the stream. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_livestream_analytics_complete( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.data) ``` #### Response ```json { "data": { "count": 0, "total_ingest_seconds": 0, "total_viewer_seconds": 0 }, "success": true } ``` ## Fetch day-wise session and recording analytics data for an App `realtime_kit.livestreams.get_org_analytics(strapp_id, LivestreamGetOrgAnalyticsParams**kwargs) -> LivestreamGetOrgAnalyticsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise` Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `end_date: Optional[str]` end date in YYYY-MM-DD format - `start_date: Optional[str]` start date in YYYY-MM-DD format ### Returns - `class LivestreamGetOrgAnalyticsResponse: …` - `data: Optional[Data]` - `recording_stats: Optional[DataRecordingStats]` Recording statistics of an App during the range specified - `day_stats: Optional[List[DataRecordingStatsDayStat]]` Day wise recording stats - `day: Optional[str]` - `total_recording_minutes: Optional[int]` Total recording minutes for a specific day - `total_recordings: Optional[int]` Total number of recordings for a specific day - `recording_count: Optional[int]` Total number of recordings during the range specified - `recording_minutes_consumed: Optional[float]` Total recording minutes during the range specified - `session_stats: Optional[DataSessionStats]` Session statistics of an App during the range specified - `day_stats: Optional[List[DataSessionStatsDayStat]]` Day wise session stats - `day: Optional[str]` - `total_session_minutes: Optional[float]` Total session minutes for a specific day - `total_sessions: Optional[int]` Total number of sessions for a specific day - `sessions_count: Optional[int]` Total number of sessions during the range specified - `sessions_minutes_consumed: Optional[float]` Total session minutes during the range specified - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_org_analytics( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.data) ``` #### Response ```json { "data": { "recording_stats": { "day_stats": [ { "day": "day", "total_recording_minutes": 0, "total_recordings": 0 } ], "recording_count": 0, "recording_minutes_consumed": 0 }, "session_stats": { "day_stats": [ { "day": "day", "total_session_minutes": 0, "total_sessions": 0 } ], "sessions_count": 0, "sessions_minutes_consumed": 0 } }, "success": true } ``` ## Fetch active livestreams for a meeting `realtime_kit.livestreams.get_meeting_active_livestreams(strmeeting_id, LivestreamGetMeetingActiveLivestreamsParams**kwargs) -> LivestreamGetMeetingActiveLivestreamsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream` Returns details of all active livestreams for the given meeting ID. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `meeting_id: str` ### Returns - `class LivestreamGetMeetingActiveLivestreamsResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` - `name: Optional[str]` Name of the livestream. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_meeting_active_livestreams( meeting_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "disabled": "disabled", "ingest_server": "ingest_server", "meeting_id": "meeting_id", "name": "name", "playback_url": "playback_url", "status": "LIVE", "stream_key": "stream_key", "updated_at": "2019-12-27T18:11:19.117Z" }, "success": true } ``` ## Fetch livestream session details using livestream session ID `realtime_kit.livestreams.get_livestream_session_details_for_session_id(strlivestream_session_id, LivestreamGetLivestreamSessionDetailsForSessionIDParams**kwargs) -> LivestreamGetLivestreamSessionDetailsForSessionIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams/sessions/{livestream-session-id}` Returns livestream session details for the given livestream session ID. Retrieve the `livestream_session_id`using the `Fetch livestream session details using a session ID` API. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `livestream_session_id: str` ### Returns - `class LivestreamGetLivestreamSessionDetailsForSessionIDResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `err_message: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `ingest_seconds: Optional[int]` Name of the livestream. - `livestream_id: Optional[str]` - `started_time: Optional[str]` Unique key for accessing each livestream. - `stopped_time: Optional[str]` The web address that viewers can use to watch the livestream. - `updated_at: Optional[str]` Timestamp the object was updated at. The time is returned in ISO format. - `viewer_seconds: Optional[int]` Specifies if the livestream was disabled. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_livestream_session_details_for_session_id( livestream_session_id="livestream-session-id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "err_message": "err_message", "ingest_seconds": 0, "livestream_id": "livestream_id", "started_time": "started_time", "stopped_time": "stopped_time", "updated_at": "updated_at", "viewer_seconds": 0 }, "success": true } ``` ## Fetch active livestream session details `realtime_kit.livestreams.get_active_livestreams_for_livestream_id(strlivestream_id, LivestreamGetActiveLivestreamsForLivestreamIDParams**kwargs) -> LivestreamGetActiveLivestreamsForLivestreamIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/active-livestream-session` Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `livestream_id: str` ### Returns - `class LivestreamGetActiveLivestreamsForLivestreamIDResponse: …` - `data: Optional[Data]` - `livestream: Optional[DataLivestream]` - `id: Optional[str]` - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` ID of the meeting. - `name: Optional[str]` Name of the livestream. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `session: Optional[DataSession]` - `id: Optional[str]` - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `err_message: Optional[str]` - `ingest_seconds: Optional[str]` The time duration for which the input was given or the meeting was streamed. - `invoked_time: Optional[datetime]` Timestamp the object was invoked. The time is returned in ISO format. - `livestream_id: Optional[str]` - `started_time: Optional[datetime]` Timestamp the object was started. The time is returned in ISO format. - `stopped_time: Optional[datetime]` Timestamp the object was stopped. The time is returned in ISO format. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `viewer_seconds: Optional[str]` The total view time for which the viewers watched the stream. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_active_livestreams_for_livestream_id( livestream_id="livestream_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "livestream": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "disabled": "disabled", "ingest_server": "ingest_server", "meeting_id": "meeting_id", "name": "name", "playback_url": "playback_url", "status": "LIVE", "stream_key": "stream_key", "updated_at": "2019-12-27T18:11:19.117Z" }, "session": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "err_message": "err_message", "ingest_seconds": "ingest_seconds", "invoked_time": "2019-12-27T18:11:19.117Z", "livestream_id": "livestream_id", "started_time": "2019-12-27T18:11:19.117Z", "stopped_time": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "viewer_seconds": "viewer_seconds" } }, "success": true } ``` ## Fetch livestream details using livestream ID `realtime_kit.livestreams.get_livestream_session_for_livestream_id(strlivestream_id, LivestreamGetLivestreamSessionForLivestreamIDParams**kwargs) -> LivestreamGetLivestreamSessionForLivestreamIDResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}` Returns details of a livestream with sessions for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `livestream_id: str` - `page_no: Optional[int]` The page number from which you want your page search results to be displayed. - `per_page: Optional[int]` Number of results per page. ### Returns - `class LivestreamGetLivestreamSessionForLivestreamIDResponse: …` - `data: Optional[Data]` - `livestream: Optional[DataLivestream]` - `id: Optional[str]` ID of the livestream. - `created_at: Optional[str]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` The ID of the meeting. - `name: Optional[str]` Name of the livestream. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[str]` Timestamp the object was updated at. The time is returned in ISO format. - `paging: Optional[DataPaging]` - `end_offset: Optional[int]` - `start_offset: Optional[int]` - `total_count: Optional[int]` - `session: Optional[DataSession]` - `id: Optional[str]` ID of the session. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `err_message: Optional[str]` - `ingest_seconds: Optional[float]` The time duration for which the input was given or the meeting was streamed. - `invoked_time: Optional[datetime]` Timestamp the object was invoked. The time is returned in ISO format. - `livestream_id: Optional[str]` - `started_time: Optional[datetime]` Timestamp the object was started. The time is returned in ISO format. - `stopped_time: Optional[datetime]` Timestamp the object was stopped. The time is returned in ISO format. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `viewer_seconds: Optional[float]` The total view time for which the viewers watched the stream. - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.livestreams.get_livestream_session_for_livestream_id( livestream_id="livestream_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", app_id="app_id", ) print(response.data) ``` #### Response ```json { "data": { "livestream": { "id": "id", "created_at": "created_at", "disabled": "disabled", "ingest_server": "ingest_server", "meeting_id": "meeting_id", "name": "name", "playback_url": "playback_url", "status": "LIVE", "stream_key": "stream_key", "updated_at": "updated_at" }, "paging": { "end_offset": 1, "start_offset": 1, "total_count": 1 }, "session": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "err_message": "err_message", "ingest_seconds": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "livestream_id": "livestream_id", "started_time": "2019-12-27T18:11:19.117Z", "stopped_time": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "viewer_seconds": 0 } }, "success": true } ``` ## Domain Types ### Livestream Create Independent Livestream Response - `class LivestreamCreateIndependentLivestreamResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `disabled: Optional[bool]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder should send the video and audio data. - `meeting_id: Optional[str]` - `name: Optional[str]` - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `success: Optional[bool]` ### Livestream Get All Livestreams Response - `class LivestreamGetAllLivestreamsResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The ID of the livestream. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` ID of the meeting. - `name: Optional[str]` Name of the livestream. - `paging: Optional[DataPaging]` - `end_offset: Optional[int]` - `start_offset: Optional[int]` - `total_count: Optional[int]` - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `success: Optional[bool]` ### Livestream Stop Livestreaming A Meeting Response - `class LivestreamStopLivestreamingAMeetingResponse: …` - `data: Optional[Data]` - `message: Optional[str]` - `success: Optional[bool]` ### Livestream Start Livestreaming A Meeting Response - `class LivestreamStartLivestreamingAMeetingResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `success: Optional[bool]` ### Livestream Get Livestream Analytics Complete Response - `class LivestreamGetLivestreamAnalyticsCompleteResponse: …` - `data: Optional[Data]` - `count: Optional[int]` Count of total livestreams. - `total_ingest_seconds: Optional[int]` Total time duration for which the input was given or the meeting was streamed. - `total_viewer_seconds: Optional[int]` Total view time for which the viewers watched the stream. - `success: Optional[bool]` ### Livestream Get Org Analytics Response - `class LivestreamGetOrgAnalyticsResponse: …` - `data: Optional[Data]` - `recording_stats: Optional[DataRecordingStats]` Recording statistics of an App during the range specified - `day_stats: Optional[List[DataRecordingStatsDayStat]]` Day wise recording stats - `day: Optional[str]` - `total_recording_minutes: Optional[int]` Total recording minutes for a specific day - `total_recordings: Optional[int]` Total number of recordings for a specific day - `recording_count: Optional[int]` Total number of recordings during the range specified - `recording_minutes_consumed: Optional[float]` Total recording minutes during the range specified - `session_stats: Optional[DataSessionStats]` Session statistics of an App during the range specified - `day_stats: Optional[List[DataSessionStatsDayStat]]` Day wise session stats - `day: Optional[str]` - `total_session_minutes: Optional[float]` Total session minutes for a specific day - `total_sessions: Optional[int]` Total number of sessions for a specific day - `sessions_count: Optional[int]` Total number of sessions during the range specified - `sessions_minutes_consumed: Optional[float]` Total session minutes during the range specified - `success: Optional[bool]` ### Livestream Get Meeting Active Livestreams Response - `class LivestreamGetMeetingActiveLivestreamsResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` - `name: Optional[str]` Name of the livestream. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `success: Optional[bool]` ### Livestream Get Livestream Session Details For Session ID Response - `class LivestreamGetLivestreamSessionDetailsForSessionIDResponse: …` - `data: Optional[Data]` - `id: Optional[str]` The livestream ID. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `err_message: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `ingest_seconds: Optional[int]` Name of the livestream. - `livestream_id: Optional[str]` - `started_time: Optional[str]` Unique key for accessing each livestream. - `stopped_time: Optional[str]` The web address that viewers can use to watch the livestream. - `updated_at: Optional[str]` Timestamp the object was updated at. The time is returned in ISO format. - `viewer_seconds: Optional[int]` Specifies if the livestream was disabled. - `success: Optional[bool]` ### Livestream Get Active Livestreams For Livestream ID Response - `class LivestreamGetActiveLivestreamsForLivestreamIDResponse: …` - `data: Optional[Data]` - `livestream: Optional[DataLivestream]` - `id: Optional[str]` - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` ID of the meeting. - `name: Optional[str]` Name of the livestream. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `session: Optional[DataSession]` - `id: Optional[str]` - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `err_message: Optional[str]` - `ingest_seconds: Optional[str]` The time duration for which the input was given or the meeting was streamed. - `invoked_time: Optional[datetime]` Timestamp the object was invoked. The time is returned in ISO format. - `livestream_id: Optional[str]` - `started_time: Optional[datetime]` Timestamp the object was started. The time is returned in ISO format. - `stopped_time: Optional[datetime]` Timestamp the object was stopped. The time is returned in ISO format. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `viewer_seconds: Optional[str]` The total view time for which the viewers watched the stream. - `success: Optional[bool]` ### Livestream Get Livestream Session For Livestream ID Response - `class LivestreamGetLivestreamSessionForLivestreamIDResponse: …` - `data: Optional[Data]` - `livestream: Optional[DataLivestream]` - `id: Optional[str]` ID of the livestream. - `created_at: Optional[str]` Timestamp the object was created at. The time is returned in ISO format. - `disabled: Optional[str]` Specifies if the livestream was disabled. - `ingest_server: Optional[str]` The server URL to which the RTMP encoder sends the video and audio data. - `meeting_id: Optional[str]` The ID of the meeting. - `name: Optional[str]` Name of the livestream. - `playback_url: Optional[str]` The web address that viewers can use to watch the livestream. - `status: Optional[Literal["LIVE", "IDLE", "ERRORED", "INVOKED"]]` - `"LIVE"` - `"IDLE"` - `"ERRORED"` - `"INVOKED"` - `stream_key: Optional[str]` Unique key for accessing each livestream. - `updated_at: Optional[str]` Timestamp the object was updated at. The time is returned in ISO format. - `paging: Optional[DataPaging]` - `end_offset: Optional[int]` - `start_offset: Optional[int]` - `total_count: Optional[int]` - `session: Optional[DataSession]` - `id: Optional[str]` ID of the session. - `created_at: Optional[datetime]` Timestamp the object was created at. The time is returned in ISO format. - `err_message: Optional[str]` - `ingest_seconds: Optional[float]` The time duration for which the input was given or the meeting was streamed. - `invoked_time: Optional[datetime]` Timestamp the object was invoked. The time is returned in ISO format. - `livestream_id: Optional[str]` - `started_time: Optional[datetime]` Timestamp the object was started. The time is returned in ISO format. - `stopped_time: Optional[datetime]` Timestamp the object was stopped. The time is returned in ISO format. - `updated_at: Optional[datetime]` Timestamp the object was updated at. The time is returned in ISO format. - `viewer_seconds: Optional[float]` The total view time for which the viewers watched the stream. - `success: Optional[bool]` # Analytics ## Fetch day-wise session and recording analytics data for an App `realtime_kit.analytics.get_org_analytics(strapp_id, AnalyticsGetOrgAnalyticsParams**kwargs) -> AnalyticsGetOrgAnalyticsResponse` **get** `/accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise` Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date. ### Parameters - `account_id: str` The account identifier tag. - `app_id: str` The app identifier tag. - `end_date: Optional[str]` end date in YYYY-MM-DD format - `start_date: Optional[str]` start date in YYYY-MM-DD format ### Returns - `class AnalyticsGetOrgAnalyticsResponse: …` - `data: Optional[Data]` - `recording_stats: Optional[DataRecordingStats]` Recording statistics of an App during the range specified - `day_stats: Optional[List[DataRecordingStatsDayStat]]` Day wise recording stats - `day: Optional[str]` - `total_recording_minutes: Optional[int]` Total recording minutes for a specific day - `total_recordings: Optional[int]` Total number of recordings for a specific day - `recording_count: Optional[int]` Total number of recordings during the range specified - `recording_minutes_consumed: Optional[float]` Total recording minutes during the range specified - `session_stats: Optional[DataSessionStats]` Session statistics of an App during the range specified - `day_stats: Optional[List[DataSessionStatsDayStat]]` Day wise session stats - `day: Optional[str]` - `total_session_minutes: Optional[float]` Total session minutes for a specific day - `total_sessions: Optional[int]` Total number of sessions for a specific day - `sessions_count: Optional[int]` Total number of sessions during the range specified - `sessions_minutes_consumed: Optional[float]` Total session minutes during the range specified - `success: Optional[bool]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.realtime_kit.analytics.get_org_analytics( app_id="app_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(response.data) ``` #### Response ```json { "data": { "recording_stats": { "day_stats": [ { "day": "day", "total_recording_minutes": 0, "total_recordings": 0 } ], "recording_count": 0, "recording_minutes_consumed": 0 }, "session_stats": { "day_stats": [ { "day": "day", "total_session_minutes": 0, "total_sessions": 0 } ], "sessions_count": 0, "sessions_minutes_consumed": 0 } }, "success": true } ``` ## Domain Types ### Analytics Get Org Analytics Response - `class AnalyticsGetOrgAnalyticsResponse: …` - `data: Optional[Data]` - `recording_stats: Optional[DataRecordingStats]` Recording statistics of an App during the range specified - `day_stats: Optional[List[DataRecordingStatsDayStat]]` Day wise recording stats - `day: Optional[str]` - `total_recording_minutes: Optional[int]` Total recording minutes for a specific day - `total_recordings: Optional[int]` Total number of recordings for a specific day - `recording_count: Optional[int]` Total number of recordings during the range specified - `recording_minutes_consumed: Optional[float]` Total recording minutes during the range specified - `session_stats: Optional[DataSessionStats]` Session statistics of an App during the range specified - `day_stats: Optional[List[DataSessionStatsDayStat]]` Day wise session stats - `day: Optional[str]` - `total_session_minutes: Optional[float]` Total session minutes for a specific day - `total_sessions: Optional[int]` Total number of sessions for a specific day - `sessions_count: Optional[int]` Total number of sessions during the range specified - `sessions_minutes_consumed: Optional[float]` Total session minutes during the range specified - `success: Optional[bool]`