report.getTotal - Analytics
report.getTotal
Retrieves aggregate totals for a report type as a single row.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reportType | int | Yes | KalturaReportType integer ID (see Report Types Reference) |
reportInputFilter[objectType] | string | Yes | Always KalturaEndUserReportInputFilter |
reportInputFilter[fromDate] | int | Yes | Start date as Unix timestamp in seconds |
reportInputFilter[toDate] | int | Yes | End date as Unix timestamp in seconds |
reportInputFilter[timeZoneOffset] | int | No | Timezone offset in minutes. Default: 0 |
reportInputFilter[entryIdIn] | string | No | Filter by entry IDs (pipe-separated) |
reportInputFilter[virtualEventIdIn] | string | No | Scope to virtual event(s) |
responseOptions[objectType] | string | No | KalturaReportResponseOptions |
responseOptions[delimiter] | string | No | Field delimiter. Default: , (use | for consistency) |
curl -X POST "$KALTURA_SERVICE_URL/service/report/action/getTotal" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "reportType=38" \
-d "reportInputFilter[objectType]=KalturaEndUserReportInputFilter" \
-d "reportInputFilter[fromDate]=$FROM_TIMESTAMP" \
-d "reportInputFilter[toDate]=$TO_TIMESTAMP" \
-d "responseOptions[objectType]=KalturaReportResponseOptions" \
-d "responseOptions[delimiter]=|"
Response:
{
"header": "count_plays|unique_known_users|sum_time_viewed|avg_time_viewed",
"data": "1250|340|45600|36.5",
"objectType": "KalturaReportTotal"
}