How could i list the entries i see in KMC using API

Hello,

I am using the Test Console (http://www.kaltura.com/api_v3/testme/index.php#) and I i am trying to get the entries that i see in Kaltura Management Console (KMC);

  1. i generated a session string using session.start => KS

  2. i called data.list, using that generated session KS but i always get an empty list, even though in KMC i see more entries.

    <xml>
    <result>
    <objectType>KalturaDataListResponse</objectType>
    <objects/>
    <totalCount>0</totalCount>
    <relatedObjects/>
    </result>
    <executionTime>0.0794358253479</executionTime>
    </xml>

Can you please help me with with a hint to what i may be doing wrong ?
Maybe i should call another API method to list the entries ?

Hello,

You need to call either media->list() or baseEntry->list()
Also, note that you will not get all entries due to paging.
Here is how to obtain all entries using the API:
https://www.kaltura.org/demos/listentries/

Full code for this demo is here:

The short flow is:

// get total count
$total_media_entries = $client->media->count($filter);
// init a pager object
$pager = new KalturaFilterPager();
$page_index=1;
$pager->pageSize = 500;
$processed_entries=0;

// iterate over entries 
while ($processed_entries < $total_media_entries){
// page index incremented at each iteration:
    $pager->pageIndex=$page_index;
    $result = $client->media->listAction($filter, $pager);
        foreach ($result->objects as $entry) {
            $processed_entries++;
            // do something more interesting with the entry
            var_dump($entry);
        }
    $page_index++;
}

ok, thank you very much