Fetch livestream session details using a session ID
realtime_kit.livestreams.get_livestream_sessions_for_session(strsession_id, LivestreamGetLivestreamSessionsForSessionParams**kwargs) -> LivestreamGetLivestreamSessionsForSessionResponse
GET/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/livestream-sessions
Returns livestream session details for the given session ID. Retreive the session ID using the Fetch all sessions of an App API.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Fetch livestream session details using a 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_sessions_for_session(
session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="14a396e7-ca44-4937-bf1f-050a69118543",
)
print(response.data){
"data": {
"data": [
{
"created_at": "2023-07-15T07:08:40.742Z",
"err_message": null,
"id": "cf55a850-c3fd-46b5-b5d2-25b3b9aa1686",
"ingest_seconds": 600,
"invoked_time": "2023-07-15T07:08:26.634Z",
"livestream_id": "b60ef3da-fbbb-441b-9168-8235b0035248",
"started_time": "2023-07-15T07:08:39Z",
"stopped_time": "2023-07-15T07:18:39Z",
"updated_at": "2023-07-15T07:18:40.742Z",
"viewer_seconds": 1200
}
],
"paging": {
"end_offset": 1,
"start_offset": 1,
"total_count": 1
}
},
"success": true
}Returns Examples
{
"data": {
"data": [
{
"created_at": "2023-07-15T07:08:40.742Z",
"err_message": null,
"id": "cf55a850-c3fd-46b5-b5d2-25b3b9aa1686",
"ingest_seconds": 600,
"invoked_time": "2023-07-15T07:08:26.634Z",
"livestream_id": "b60ef3da-fbbb-441b-9168-8235b0035248",
"started_time": "2023-07-15T07:08:39Z",
"stopped_time": "2023-07-15T07:18:39Z",
"updated_at": "2023-07-15T07:18:40.742Z",
"viewer_seconds": 1200
}
],
"paging": {
"end_offset": 1,
"start_offset": 1,
"total_count": 1
}
},
"success": true
}