Unable to retrieve Catagories via the API

I am getting back a response from the API containing my video asset, however “catagorization” is missing.
I am using the Node.js lib

and get back a response … with this included:

"status" : 2,
     "votes" : 0,
     "categories" : "",
     "name" : "BLAH",
     "plays" : 0,

The code is as follows:

var id = req.params.id;
var mycb = function (success, results) {
if (!success) {
  //console.log("failed:" + results);
  res.json(success);
} else {
  //console.log("passed:" + require('util').inspect(success, false, null));
  res.json(success);
}

};

  if(!id) {
    res.json("{error: no id supplied}");
  } else {
    var config = new Kaltura.KalturaConfiguration(1111111);
    config.serviceUrl = SERVICE_URL;
var client = new Kaltura.KalturaClient(config);
client.session.start(function (ks) {
      if (ks.code && ks.message) {
        //console.log('Error starting session', success, ks);
      } else {
        client.setKs(ks);
        var type = require('kaltura/KalturaVO');
        var filter = new type.KalturaMediaEntryFilter();
        var pager = new type.KalturaFilterPager();
        //var filter = new Filter();
        filter.referenceIdEqual = id;

        //console.log("Success: " + require('util').inspect(client, false, null));
        var res = client.media.listAction(mycb, filter, pager);
        //console.log("result is " + res);

      }
    }, "9c06b188bfb571ae1111111",
    "avron@1111111.com",
    Kaltura.enums.KalturaSessionType.ADMIN,
    1111111);

I have also set the entitlements via the KMC to have no restrictions

Any ideas ?

Hello,

Not quite sure I understand what you mean by “Categorization is missing”?
Basically, an entry object would have:
categories fish
categoriesIds 12

i.e, a class member called ‘categories’ with a CSV of the category names and ‘categoriesIds’ with their IDs.
Are you sure the entries you are looking at are attached to a category? do you see them as attached to a category in KMC?
Also, as far as restrictions go, you can always create a session, passing disableentitlement as the privileges param, that is the last param when calling session.start()

Yes the Category and CatagoryIDs fields are blank,but can see them in the KMC

Also my API starts a session as ADMIN, so I image entitlements should not come into it ??

I ran with “disableentitlement”

client.session.start(function (ks) {
      if (ks.code && ks.message) {
        //console.log('Error starting session', success, ks);
      } else {
        client.setKs(ks);
        var type = require('kaltura/KalturaVO');
        var filter = new type.KalturaMediaEntryFilter();
        var pager = new type.KalturaFilterPager();
        //var filter = new Filter();
        filter.referenceIdEqual = id;

        //console.log("Success: " + require('util').inspect(client, false, null));
        var res = client.media.listAction(mycb, filter, pager);
        //console.log("result is " + res);

      }
    }, "xxxxxxxxxxxxxxx",
    "a@xxxxxx.com",
    Kaltura.enums.KalturaSessionType.ADMIN,
    xxxxxxx,"", "disableentitlement");

Still nothing in the respective fields

Jess,

Do you have any further thoughts on this ?

Do it work when you try it from the testme console?
Also, are you working on SaaS or a self hosted ENV? If the latter, do you have several sphinx instances? perhaps they are not en-sync?

Does not work on “testme” either … we are SaaS customer, have raised a ticket - waiting response.