jobs listing

4 replies [Last post]
Joined: 08/30/2011
Points: 65

Hi guys,

I would like to follow the progression of a video conversion with the php API_v3 .The job status of this conversion seem the best way for me to do that for the moment but i'm block because i can't have permission to list, add or do anything with the KalturaJobsService class. I always get a permission denied response in the log.

I tried a ADMIN session but same error.

How the job vs permission works exactly and if am on the wrong way to follow my conversion status please point me in the right direction.

I'm hosting kaltura on Ubuntu. Upload, converting and download are working fine.

Thanks for the responses

Joined: 08/07/2010
Points: 3

Hi Mick,

Since you're using your own installation of Kaltura, then you're the boss and probably able to grant whatever permissions you wish.

If you wish to add permissions to the end users of your system, you can check the deployment update scripts (deployment/update/script/add_permissions folder) to see few examples of adding new permissions using ini configuration files.

If you wish to view the jobs info in your administration system , then you already have the admin console batch process screens to see the queued, in-progress and failed jobs. Personally, I use the entry investigation page to see all the jobs of a specific entry and their statuses.
Since the admin console is also using the API (v3) as a client, we already granted all the jobs actions to the admin console users (partner -2).

Tan-Tan

Joined: 08/30/2011
Points: 65

Thanks for the answer,

I know how to see the jobs on the admin control panel but my goal is to us the php client API (v3) for this :

1 - Upload a video (OK)
2 - Add the Entry for this video with the right name, categorie, convertprofile, etc... (OK)
3 - The point 2 should return something like the jobid of the conversion. I want to code something with the client API that will return the status of this jobid. (that's the part that i'm not sure how to do this)

So far, i have permission denied on any call to the job service, but you said that's possible to create a session as a admin console user and this will allow me access to the job service object in the API (v3) ?

How do with start a session with admin console user access with the client API (v3)? Where can i find the secret and partner_id = -2?

Thanks, sry for the bad english

Joined: 01/05/2009
Points: 1697

Hi Mick,

This might be a bit confusing at start, however very robust and much easier to manage once understood.
Users in Kaltura are shared between the applications, KMC, Admin Console, etc.
So if you've used your email, say: kalturaian@kaltura.org to register for multiple accounts in KMC as well as an Admin Console user - this email is shared among all. what determines which role and what permission the generated KS (Kaltura Session) is using, will then be the partner id used to call session.start or user.login.

In case of the Admin Console, the partner id is always == -2.
So if you'd like to start a session with Admin Console permissions you need two things:
1. Have the email address registered as an Admin Console user (partner id == -2).
2. Call user.login with the right credentials and partner id == -2.

<?php
$partnerId = -2;
$config = new KalturaConfiguration($partnerId);
$config->serviceUrl = 'http://www.kaltura.com/';
$client = new KalturaClient($config);
$userId = 'kalturaian@kaltura.org';
$password = 'yourpartnerpassword!';
$kalturaSession = $client->user->login($partnerId, $userId, $password);
Joined: 08/30/2011
Points: 65

Thx for the infos guys, helped alot!