Cannot get any data from report.getUrlForReportAsCsv

I am trying to use the report.getUrlForReportAsCsv API but am at a loss as to why I can’t get any data returned in my reports.
Here are the parameters I am using:

curl -X POST https://www.kaltura.com/api_v3/service/report/action/getUrlForReportAsCsv
-d “ks=$KALTURA_SESSION”
-d “reportTitle=User%20Engagement”
-d “reportText=Testtext”
-d “headers=test%20header”
-d “reportType=13”
-d “reportInputFilter[objectType]=KalturaEndUserReportInputFilter”
-d “reportInputFilter[entryIdIn]=0_92iw3h46”
-d “reportInputFilter[interval]=days”
-d “reportInputFilter[fromDate]=1618915740”
-d “reportInputFilter[toDate]=1626778140”
-d “pager[pageSize]=10”
-d “pager[pageIndex]=1”
-d “pager[objectType]=KalturaFilterPager”
-d “order=-count_plays”
-d “responseOptions[delimiter]=%7C”
-d “responseOptions[skipEmptyDates]=true”
-d “responseOptions[objectType]=KalturaReportResponseOptions”

I know there are entries for that video during the time range and I can see them using the report.getTable API.
I think it maybe the reportText and headers parameters but looking at both the API console and testme console documentation I cannot work out what values it is expecting.

Hi @DanP ,

Please see a fully functional example below.

Note that both EPOCH and human readable dates (in the format of %Y%m%d) are supported, as below:
-d "reportInputFilter[fromDay]=20210101" \
-d "reportInputFilter[toDay]=20210901" \

In order to filter for specific entry IDs, use:
-d "objectIds=0_92iw3h46" \

Lastly, if you’d like to get the response in JSON format rather than XML, use format/1, like so:

https://www.kaltura.com/api_v3/service/report/action/getUrlForReportAsCsv/format/1
KALTURA_SESSION=$1
curl -X POST https://www.kaltura.com/api_v3/service/report/action/getUrlForReportAsCsv \
-d "ks=$KALTURA_SESSION" \
-d "reportTitle=User%20Engagement" \
-d "reportText=Testtext" \
-d "headers=;name,unique_videos,count_plays,sum_time_viewed,avg_time_viewed,avg_view_drop_off,count_loads,load_play_ratio" \
-d "reportType=13" \
-d "objectIds=0_92iw3h46" \
-d "reportInputFilter[objectType]=KalturaReportInputFilter" \
-d "reportInputFilter[interval]=days" \
-d "reportInputFilter[fromDate]=1618915740" \
-d "reportInputFilter[toDate]=1626778140" \
-d "pager[pageIndex]=1" \
-d "pager[objectType]=KalturaFilterPager" 

Cheers,

Thanks @jess,

That is giving me data now.

Dan