List videos based on owner's group membership

Hey Jess,

I’ve bulk imported several users to a new group via the new group management tool. Now I’m trying to return a list of all the videos uploaded by the members of that group.

I’ve started by using baseEntry.list, because KalturaBaseEntryFilter has the “groupIdEqual” field. I’m having trouble, though, because that query expects an integer, but my group ID is a string (that matches the group name).

So, two questions: 1) is it possible to get a list of videos filtered by owner’s group membership? Then, if so, what is the best way to go about getting that list via api? Or, if not, how best to list videos uploaded by a large group of people, without manually searching for their ID numbers?

Thanks,
Ben

Hello @benmcramer,

You can call groupuser.list(), setting KalturaGroupUserFilter->groupIdEqual to the group ID (string).
That will return all members of the group. Then, you can call baseEntry.list() with KalturaMediaEntryFilter->userIdIn, setting it to a comma separated list of the users returned from the groupuser.list() request.

Thanks Jess!

Is there a size limit for the KalturaMediaEntryFilter -> userIdIn request?

I’m working with upwards on 11,000 user accounts (the comma separated list is 87,000 characters long), and it’s only returning 40 videos when I anticipated closer to 1300.

Hello @benmcramer,

Yes, there’s a limit to both the amount of records that can be returned in one request from baseEntry.list() [you must use the paging mechanism] and the amount of values you can set the filter to.
Perhaps you’d find using this export tool easier:

You can then filter based on the userId if need be.
The code above also accomplishes the task by using the different APIs and you may revise it to fit your specific needs.

Cheers,

1 Like