Skip to content
Start here

Fetch day-wise session and recording analytics data for an App

realtime_kit.analytics.get_org_analytics(strapp_id, AnalyticsGetOrgAnalyticsParams**kwargs) -> AnalyticsGetOrgAnalyticsResponse
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.

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_date: Optional[str]

end date in YYYY-MM-DD format

start_date: Optional[str]

start date in YYYY-MM-DD format

ReturnsExpand Collapse
class AnalyticsGetOrgAnalyticsResponse:
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]

Fetch day-wise session and recording analytics data for an App

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.analytics.get_org_analytics(
    app_id="app_id",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(response.data)
{
  "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
}
Returns Examples
{
  "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
}