More info is needed. That’s the line in the client’s code where the exception is thrown but many many paths can lead there.
Please provide the full trace.
ubuntu@k3:~/Kaltura-Library-Export-Excel$ php entries.php id key http://www.kaltura.com/
PHP Notice: Undefined offset: 0 in /home/ubuntu/Kaltura-Library-Export-Excel/entries.php on line 44
PHP Notice: Trying to get property of non-object in /home/ubuntu/Kaltura-Library-Export-Excel/entries.php on line 44
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Missing parameter “id”’ in /opt/kaltura/web/content/clientlibs/php5/KalturaClientBase.php:894
Stack trace: #0 /opt/kaltura/web/content/clientlibs/php5/KalturaClient.php(1483): KalturaClientBase->throwExceptionIfError(Array) #1 /home/ubuntu/Kaltura-Library-Export-Excel/entries.php(45): KalturaCategoryService->get(NULL) #2 {main}
thrown in /opt/kaltura/web/content/clientlibs/php5/KalturaClientBase.php on line 894
And line 44 of /home/ubuntu/Kaltura-Library-Export-Excel/entries.php reads?
The thread you referred to contains two scripts and a lot of posts besides:)
It would therefore be best if you attached the exact code you’re running.
If line 44 is:
$cat = $client->category->get($cat_id);
Then the reason is relatively obvious:) To wit: if an entry is not associated with any categories,
$cat_entry->objects[0]->categoryId;
will be undefined, which in turn means $cat_id will also be undefined and so:
Awesome made those changes and things started to work. A couple questions I have 4000+ media entries I am changing the page index to get all of them. Page Size is there a limit in the api, I tried higher than 500 but still just returns 500.
You cannot get more than 500 entries in one request. That’s why paging is necessary.
The code sets the page index to 1 initially and then starts iterating over the entries, increasing $page_index by one at the end of each iteration. And so, during the first iteration, you’ll get the first 500 entries to process [page 1], in the second, entries 500 to 1000 [page 2] and so forth until all entries are processed.