How can I get total number of minutes, a video is played irrespective of users through API

I have a business case where I need to find total number of minutes a video is played on kaltura platform by any of the user of a partner through API call.

I also have one more case related to this where I have to find total number of unique users who have played a particular video.

Hi @abhishekkumarSimpplr ,

Calling report.getCsvFromStringParams() [see https://developer.kaltura.com/api-docs/service/report/action/getCsvFromStringParams] with id set to 1004 will return the following metrics:
Entry ID, Entry Name, Categories, Plays, Minutes Viewed, Avg. View Time, Player Impression, Play to Impression Ratio, Avg. View Drop-off

With id set to 1001, you can obtain:
entry_id,entry_name,user_id,source_size,last_played_at,count_plays

The params value for that action should be from_date_id=$D_FROM;to_date_id=$D_TO. The format for from_date_id and to_date_id is %Y%m%d.

Cheers,

Hi @jess ,
report.getCsvFromStringParams() returns only metrics not the data for a media. It does not take media related input in request.
I want number of minutes a video is played.

Hello,

Sorry but I do not understand what you mean.
As noted in my original response, report ID 1004 will return the following metrics:

Entry ID, Entry Name, Categories, Plays, Minutes Viewed, Avg. View Time, Player Impression, Play to Impression Ratio, Avg. View Drop-off

That clearly includes Minutes Viewed which is what you stated you are after.
For example:

Entry ID, Entry Name, Categories, Plays, Minutes Viewed, Avg. View Time, Player Impression, Play to Impression Ratio, Avg. View Drop-off
1_jz404fbl,“Clip of HD_Test_3_(Source)”,"",742,257.01666666667,0.34638364779874,1459,0.50856751199452,0.16172506738544

If what you mean to say is that you wish to receive the data for a given entry ID (rather than for all entries matching the time range) then you can call report.getTable() with reportType 1 and 11. report.getTable() has an optional objectIds param which you can set to a comma separated list of entry IDs you wish to obtain data for.

If you meant something else, elaborate as to your exact need.

Hi @jess ,
I want the list of all video entries with minutes viewed, sorted in descending order on the basis of minutes viewed for a particular partner.
I have retried report.getCsvFromStringParams() with date range but it still gives the metrics only not the list of media entries. Please refer screenshot.

Hello,

Your format is incorrect. As noted previously:

In other words, do not use the ‘-’ char as a separator.

Hi @jess,
Thank you, it worked. I want one more metric in this list which is ‘Unique Viewer’ of each video. How can I get this ?

Hi @abhishekkumarSimpplr ,

See my original reply to you: