Video Deletion Workflow

Does anyone have a proper workflow or documentation on how to use the media.delete API call?
Also, if there a way to delete videos by userID instead of entryID? We’ve had users leave and would like to mass delete their files instead of manually doing it through the KMC.

Thank you!

Hello @ntrick,

Documentation for media.delete() is available here:
https://developer.kaltura.com/api-docs/service/media/action/delete

It’s really a rather simple action that accepts one param: the entry ID you wish to delete. The entry will then be marked as deleted [entry.status =3] in the DB. Note however, that it will NOT remove the media files associated with this entry from storage. If you wish for these to be automatically removed [due to space considerations], see Validate the content off the database and the content of the folder /opt/kaltura/web/content/

As for deleting entries based on the userId, you can use media.list() and pass a KalturaMediaEntryFilter object where the userIdEqual member is set to ID in question. This will return a list of entry objects and you can then pass the entries ID to media.delete().

Documentation for media.list() is available here:
https://developer.kaltura.com/api-docs/service/media/action/list