Multi-Request Batching - Analytics
Multi-Request Batching
A single analytics dashboard view typically combines getTotal + getGraphs + getTable in one HTTP call via KalturaMultiRequest. This reduces round trips from 3 to 1.
curl -X POST "$KALTURA_SERVICE_URL/service/multirequest" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "1:service=report" \
-d "1:action=getTotal" \
-d "1:reportType=38" \
-d "1:reportInputFilter[objectType]=KalturaEndUserReportInputFilter" \
-d "1:reportInputFilter[fromDate]=$FROM_TIMESTAMP" \
-d "1:reportInputFilter[toDate]=$TO_TIMESTAMP" \
-d "1:responseOptions[objectType]=KalturaReportResponseOptions" \
-d "1:responseOptions[delimiter]=|" \
-d "2:service=report" \
-d "2:action=getGraphs" \
-d "2:reportType=38" \
-d "2:reportInputFilter[objectType]=KalturaEndUserReportInputFilter" \
-d "2:reportInputFilter[fromDate]=$FROM_TIMESTAMP" \
-d "2:reportInputFilter[toDate]=$TO_TIMESTAMP" \
-d "2:reportInputFilter[interval]=days" \
-d "2:responseOptions[objectType]=KalturaReportResponseOptions" \
-d "2:responseOptions[delimiter]=|" \
-d "3:service=report" \
-d "3:action=getTable" \
-d "3:reportType=38" \
-d "3:reportInputFilter[objectType]=KalturaEndUserReportInputFilter" \
-d "3:reportInputFilter[fromDate]=$FROM_TIMESTAMP" \
-d "3:reportInputFilter[toDate]=$TO_TIMESTAMP" \
-d "3:order=-count_plays" \
-d "3:pager[pageSize]=25" \
-d "3:pager[pageIndex]=1" \
-d "3:responseOptions[objectType]=KalturaReportResponseOptions" \
-d "3:responseOptions[delimiter]=|"
Response is a JSON array with 3 elements: [KalturaReportTotal, [KalturaReportGraph, ...], KalturaReportTable].