# 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]`