Skip to content
Start here

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_idusing the Fetch livestream session details using a session ID API.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
ParametersExpand Collapse
account_id: str

The account identifier tag.

maxLength32
app_id: str

The app identifier tag.

maxLength32
livestream_session_id: str
ReturnsExpand Collapse
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.

formatdate-time
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]

Fetch livestream session details using livestream session ID

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)
{
  "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
}
Returns Examples
{
  "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
}