Skip to content
Start here

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.

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
end_time: Optional[Union[str, datetime]]

Specify the end time range in ISO format to access the livestream analytics.

formatdate-time
start_time: Optional[Union[str, datetime]]

Specify the start time range in ISO format to access the livestream analytics.

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

Fetch complete analytics data for your livestreams

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)
{
  "data": {
    "count": 0,
    "total_ingest_seconds": 0,
    "total_viewer_seconds": 0
  },
  "success": true
}
Returns Examples
{
  "data": {
    "count": 0,
    "total_ingest_seconds": 0,
    "total_viewer_seconds": 0
  },
  "success": true
}