report.getTable Documentation

Discussion for report.getTable documentation

I am attempting to use this endpoint to generate a page similar to the geographic distribution table in the management console. If I leave the objectIds off, then I get a response with data. If I include a video’s id, then I get a success message, but the response has no data. Am I wrong in assuming an object id is a Kaltura video’s id?

Hi @tallroids,

You didn’t specify the reportType you’re using but I assume we’re talking about KalturaReportType::MAP_OVERLAY?

The input for the objectIds field varies depending on the reportType. You are correct that in certain contexts, the required input is entry IDs, however, in the context of MAP_OVERLAY, the expected input is a country ID.
For example, when calling report->getTable() with $objectIds = null like so:

$reportType = KalturaReportType::MAP_OVERLAY;
$reportInputFilter = new KalturaReportInputFilter();
$pager = new KalturaFilterPager();
$order = null;
$objectIds = null;
$result = $client->report->getTable($reportType, $reportInputFilter, $pager, $order, $objectIds);

You’ll get something like:

2,UK,2104,1161,932,755,556,0.2643;
3,US,43774,15379,10698,8726,6407,0.1464;
4,CA,1433,907,739,613,444,0.3098;
5,MX,662,334,261,210,157,0.2372;
7,SE,643,426,345,275,187,0.2908;
8,IT,691,423,322,243,170,0.2460;
....

So, if you wanted to get only the records for UK, you could set:

$objectIds = 2;

Which would return something like:

3433,ENGLAND,1956,1067,861,701,517,0.2643;
3439,SCOTLAND,89,60,46,33,22,0.2472;
6436,NORTHERN IRELAND,15,4,2,2,,;
6437,WALES,39,27,20,16,15,0.3846;

Do let me know should you have additional questions,

Thanks for that information. I am trying to find out if there is a way to see the content drop-off for a specific video in all the different regions. This would allow us to see if the video is struggling in a certain area. Do you know if that information is linked? If so, is there an API call that would allow me access to that information? I was hoping with the MAP_OVERLAY endpoint I would be able to specify the video ID, and get the dropoff stats for that video in the different areas.

Hi @tallroids,

I’m afraid the current report mechanism does not allow for that.
We’re working on a new mechanism that will support this but I cannot commit to an ETA at the moment.

Thanks,

hello all…

(not sure i should be “replying” to this thread, but i’m not seeing a way to start a new thread…)

I’m brand new to what looks like a powerful and comprehensive Kaltura API that I’m excited about.

I’m looking for general documentation for the reporting (and other) interfaces… Fore example, I’ve found…

https://developer.kaltura.com/console/service/report/action/getTable

which allows me to put in some parameters by trial and error (much more of the latter…), and…

http://www.kaltura.com/api_v3/testmeDoc/actions/report.getTable.html
http://www.kaltura.com/api_v3/testmeDoc/enums/KalturaReportType.html

which has an intriguing list of nouns such as “USER_USAGE”, but no general discussion of what the report types are and what parameters they expect. Is there a trove I’m missing somewhere?

Thanks for any help! --b

Follow up question…

by watching API requests generated from KMC using browser debugging panel, I’m starting to make progress and get data back.

It looks like getTable returns essentially “csv” data, with ‘,’ token and ‘;’ line delimiters… is there documentation on this syntax? how are strings escaped? maybe even a library call to convert this to a list of lists?

digging through python API client code for KalturaClient.Plugins.Core.KalturaReportTable and superclasses, i’m not finding anything encouraging…

thanks for any help!

Hi @bowe_strickland,

You can start by looking at this step by step tutorial:
https://developer.kaltura.com/workflows/Review_Media_Analytics/Analytics_Reports
Each step includes code samples for all languages for which we have API clients.

The report service actions accept a param called reportType which should be one of the following:
https://developer.kaltura.com/api-docs/General_Objects/Enums/KalturaReportType

The action’s response will vary based on the selected report type.