Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

Delete entry via Python

$
0
0

Hi @Johnny98,

Below is sample code for the Python client.

from KalturaClient import *
from KalturaClient.Plugins.Core import *

config = KalturaConfiguration()
config.serviceUrl = "https://www.kaltura.com/"
client = KalturaClient(config)
ks = client.session.start(
      "YOUR_KALTURA_SECRET",
      "YOUR_USER_ID",
      KalturaSessionType.ADMIN,
      YOUR_PARTNER_ID)
client.setKs(ks)

entryId = ""

result = client.media.delete(entryId);
print(result);

Bear in mind that by default, calling client.media.delete(entryId) will only mark the entry as deleted [entry.status=3] in the DB. If you want that to trigger the deletion of all related files on disk, you will need to log into Admin Console->Publishers->Your Partner->Actions->Configure and check the “Purge files on deletion” option.

Note also that at developer.kaltura.com, you will find documentation for all the API actions, as well as code samples for all the clients we support. For instance, see https://developer.kaltura.com/api-docs/service/media/action/delete


Viewing all articles
Browse latest Browse all 7410

Trending Articles