Skip to content
Start here

Fetch day-wise analytics data for your livestreams

realtime_kit.livestreams.get_livestream_analytics_daywise(strapp_id, LivestreamGetLivestreamAnalyticsDaywiseParams**kwargs) -> LivestreamGetLivestreamAnalyticsDaywiseResponse
GET/accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/daywise

Returns day-wise 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[int]

Specify the end time as a Unix timestamp in seconds to access the livestream analytics.

formatint64
filters: Optional[str]

Optional filters for livestream analytics.

start_time: Optional[int]

Specify the start time as a Unix timestamp in seconds to access the livestream analytics.

formatint64
ReturnsExpand Collapse
class LivestreamGetLivestreamAnalyticsDaywiseResponse:
data: Optional[List[Data]]
count: Optional[int]

Count of total livestream sessions.

date: Optional[str]

Analytics date.

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 day-wise 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_daywise(
    app_id="app_id",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(response.data)
{
  "data": [
    {
      "count": 4,
      "date": "2023-07-15",
      "total_ingest_seconds": 531,
      "total_viewer_seconds": 116
    }
  ],
  "success": true
}
Returns Examples
{
  "data": [
    {
      "count": 4,
      "date": "2023-07-15",
      "total_ingest_seconds": 531,
      "total_viewer_seconds": 116
    }
  ],
  "success": true
}