Restore deleted entries

Hi,

If I call media.delete (entryID), I believe this would only mark those entries as “deleted” and won’t show on KMC. Is there an API command I can run to restore them?

Also, I can’t seem to get those deleted entries via media.list, am I missing something? I thought I should be able to as they would have a deleted status or something.

I’m using python library if that matters.

Thanks

Found the answer for this in When do Deleted entries actually get Deleted?.

Any ideas?

The restore action in KAC → Batch Process Control → Entry investigation does not seem to be using the API to restore an entry.

It seems to be using the admin console plugin found here:
https://github.com/kaltura/server/blob/f5d73181116ed8016fffb8694671113a353369a2/plugins/admin_console/AdminConsolePlugin.php

The admin console plugin in turn, is using entry admin services in Admin console:
https://github.com/kaltura/server/blob/f5d73181116ed8016fffb8694671113a353369a2/plugins/admin_console/services/EntryAdminService.php

So, no. I do not believe you can do this via the public API.

Hi @nwi18 ,

To fetch the deleted entries, call media.list() and pass a filter object, like so:

filter = KalturaMediaEntryFilter()
filter.statusEqual = KalturaEntryStatus.DELETED
pager = KalturaFilterPager()

result = client.media.list(filter, pager)

As to restoring entries, there is no public API for that. If you’re using CE/OP (self hosted), you can use one of these scripts (depending on your need) to change the status and re-index:
/opt/kaltura/app/alpha/scripts/utils/restoreDeletedEntries.php
/opt/kaltura/app/alpha/scripts/utils/restoreDeletedEntriesByEntryList.php

If you’re a SaaS customer, you will need to approach your account manager.

Cheers,

I see. Thanks @pnts-se and @jess :pray: