I want to delete video from kaltura using c# Asp.net. Please let me know the API which will provides this functionality.
Hello,
You want something like this:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Kaltura{
class CodeExample{
static void Main(string[] args){
KalturaConfiguration config = new KalturaConfiguration(partnerId);
config.ServiceUrl = "http://";
KalturaClient client = new KalturaClient(config);
String entryId = null;
Object result = client.BaseEntryService.Delete(entryId);
}
}
}
Hi Jess,
Thanks for reply.
I am using above code and i have modified following things
- ServiceUrl - “http://www.kaltura.com”
- EntryId - dynamically passing
- client.BaseEntryService.Delete - Return type is void
After this i am getting “Invalid KS “”, Error “-4,INVALID_TYPE”” " exception.
Please let me know if i am missing anything or doing wrong
You need to init a KS [Kaltura Session] first:
KalturaConfiguration config = new KalturaConfiguration(partnerId);
config.ServiceUrl = “http://www.kaltura.com”;
KalturaClient client = new KalturaClient(config);
String secret = null;
String userId = null;
KalturaSessionType type = KalturaSessionType.ADMIN;
int partnerId = null;
int expiry = null;
String privileges = null;
ks = client.SessionService.Start(secret, userId, type, partnerId, expiry, privileges);
client.setKs(ks);
of course, input the correct partner ID and admin_secret. You can find them in KMC under the integration tab.
Thanks for the reply. I am able to delete the video.