Kaltura API - List videos in channels associated with a specific category

I need to get a list of all the videos in a given category, including all videos that are in channels that are associated with that category (even if those videos are not explicitly added to that category).

Currently I’m using the /api_v3/service/media/action/list API, with the following json:

{
    "ks": kaltura_session_id,
    "filter": {
        "objectType": "KalturaMediaEntryFilter",
        "statusEqual": KalturaEntryStatus.READY,
        "mediaTypeEqual": KalturaMediaType.VIDEO,
        "createdAtGreaterThanOrEqual": from_date,
        "categoryAncestorIdIn": category
    },
    "pager": {"pageIndex": page_index, "pageSize": page_size},
}

However, this only returns the videos that explicitly are added to that category or sub-categories. Is there another API or another type of filter I can use to fetch all of these videos, including those in channels associated with the specified category?

If not, are there APIs that will return a list of all channels associated with a category, and return a list of videos in a channel or list of channels?

Hi @ssamo .

including all videos that are in channels that are associated with that category (even if those videos are not explicitly added to that category).

Not sure what you mean by this since channels are simply categories with certain attributes specifying entitlement rules.

For more info on that, please see Content Categories Management - Kaltura VPaaS API Documentation

To fetch a list of entries associated with given categories, use the categoryEntry.list() action (see https://developer.kaltura.com/console/service/categoryEntry/action/list).
It supports filtering based on multiple criteria, such as:

categoryIdEqual
categoryFullIdsStartsWith
categoryIdIn

Remember to generate an admin KS with the disableentitlement privilege if you need to obtain data for entries your own user ID does not have access to.

Cheers,