Problem with V3 API filter:userIdEqual

12 replies [Last post]
Joined: 05/14/2009
Points: 48

I am having problems with filter:userIdEqual in v3 API.
When I use userIdEqual filter in list action (media, mixing or baseEntry service), the API always returns 0 result. Even I am sure the userId is existing and the userIdEqual is the only filter.
Does anyone else have the same problem?

Thanks.

Joined: 11/19/2009
Points: 3

Hi All,

I am also having the same problem. And I have double checked the user is registered and I can even update the user. But when I filter by user id it returns 0 result. I even tried on Test me console. When I return all the result it shows the video posted by the specific user and also shows its user id in result. But when I filter by user id it shows 0 result.

Please can anybody help me out.

Thanks in advance.

Joined: 11/19/2009
Points: 3

Hi,

Where are all the kalturians?

Zog
Zog's picture
User offline. Last seen 3 weeks 5 days ago.
Core Team
Joined: 12/14/2009
Points: 16

Are you guys using Admin type KS or User type KS when requesting the list?

Joined: 05/14/2009
Points: 48

I am using Admin KS and filter:userIdEqual is not working for me.

Zog
Zog's picture
User offline. Last seen 3 weeks 5 days ago.
Core Team
Joined: 12/14/2009
Points: 16

User handling in API V3 included logical and DB changes in comparison to API V2.
As a result it is more efficient and provides better functionality in API V3. The downside is that it is not backward compatible. This means that filtering with API V3 for a user that was added using API V2 would not work, as you guys have seen.

We are thinking of creating a migration script for transferring from V2 to V3.

Bottom line:
API V3 & API V2 shouldn't be mixed when handling users.
Handling users in both API V3 and API V2 should work if using them exclusively.

Joined: 05/14/2009
Points: 48

Thanks for your answer. Zog.
However your answer brings me more concerns. There is no v2 and v3 compatibility issue addressed in any documents. So does this compatibility issue only happen to users data? Are there any other filters or data having the compatibility issues? If there are, we definitely need that to be documented.
Thanks.

Joined: 02/22/2009
Points: 91

Hi millsC,

In general we usually work hard to maintain backward compatibility.
However, the purpose of API v3 was to supply a better and more clear interface of what kaltura has to offer.

As part of the design and development of API v3 we decided on this change of the user management.
In the version currently on production (and in CE) no other compatibility issues should exists between the two APIs,
and if you find something that doesn't make sense to you please let us know because it will probably be something we'd want to look into.

Regarding documentation - we constantly try to improve in that area, but at the moment we don't have any specific documentation regarding changes between the twp APIs.

hope that reduces your concerns a bit.
Gonen

Joined: 02/23/2010
Points: 7

I'm having exact problem, even though i added users with api_v3, and sure that user exists:

KalturaUser Object
(
    [id] => 31339
    [partnerId] => 141572
    [screenName] => anothertest
    [fullName] =>
    [email] =>
    [dateOfBirth] =>
    [country] =>
    [state] =>
    [city] =>
    [zip] =>
    [thumbnailUrl] =>
    [description] =>
    [tags] =>
    [adminTags] =>
    [gender] =>
    [status] => 1
    [createdAt] => 1266965236
    [updatedAt] => 1266965236
    [partnerData] =>
    [indexedPartnerDataInt] =>
    [indexedPartnerDataString] =>
    [storageSize] => 0
)

and

[14] => KalturaMediaEntry Object
                (
                    [mediaType] => 2
                    [conversionQuality] =>
                    [sourceType] => 1
                    [searchProviderType] =>
                    [searchProviderId] =>
                    [creditUserName] =>
                    [creditUrl] =>
                    [mediaDate] => 2008-06-02 18:50:33
                    [dataUrl] => <a href="http://cdn.kaltura.com/p/141572/sp/14157200/flvclipper/entry_id/0_utwng1gg/version/100000
"
title="http://cdn.kaltura.com/p/141572/sp/14157200/flvclipper/entry_id/0_utwng1gg/version/100000
"
>http://cdn.kaltura.com/p/141572/sp/14157200/flvclipper/entry_id/0_utwng1...</a>                    [plays] => 0
                    [views] => 0
                    [width] => 640
                    [height] => 480
                    [duration] => 0
                    [id] => 0_utwng1gg
                    [name] => DSCN0405.JPG
                    [description] =>
                    [partnerId] => 141572
                    [userId] => 31339
                    [tags] => car
                    [adminTags] =>
                    [status] => 2
                    [type] => 1
                    [createdAt] => 1267096784
                    [rank] => 0
                    [totalRank] => 0
                    [votes] => 0
                    [groupId] =>
                    [partnerData] =>
                    [downloadUrl] => <a href="http://cdn.kaltura.com/p/141572/sp/14157200/raw/entry_id/0_utwng1gg/version/100000
"
title="http://cdn.kaltura.com/p/141572/sp/14157200/raw/entry_id/0_utwng1gg/version/100000
"
>http://cdn.kaltura.com/p/141572/sp/14157200/raw/entry_id/0_utwng1gg/vers...</a>                    [searchText] =>   DSCN0405.JPG car
                    [licenseType] =>
                    [version] => 100000
                    [thumbnailUrl] => <a href="http://cdn.kaltura.com/p/141572/sp/14157200/thumbnail/entry_id/0_utwng1gg/version/100000
"
title="http://cdn.kaltura.com/p/141572/sp/14157200/thumbnail/entry_id/0_utwng1gg/version/100000
"
>http://cdn.kaltura.com/p/141572/sp/14157200/thumbnail/entry_id/0_utwng1g...</a>                    [flavorParamsIds] =>
                    [durationType] =>
                    [categories] =>
                    [moderationStatus] => 6
                    [moderationCount] => 0
                    [accessControlId] => 55432
                    [startDate] =>
                    [endDate] =>
                )

however

$filter = new KalturaMediaEntryFilter();
$filter->statusEqual = KalturaEntryStatus::READY;
$filter->userIdEqual = '31339';
$pager = new KalturaFilterPager();
$pager->pageSize = 25;
$pager->pageIndex = 1;
$list = $client->media->listAction($filter,$pager);
print_r($list);

brings me

KalturaMediaListResponse Object ( [objects] => Array ( ) [totalCount] => 0 )

i wonder what the heck, and how to fix that?

Joined: 02/23/2010
Points: 7

i just tried this on testMe console, same results.

Joined: 02/05/2010
Points: 14

Is there some solution to this?. I have the same problem.

Joined: 02/06/2010
Points: 12

it seams to be a general KalturaMediaEntryFilter issue in api v.3.0
$filter->userIdEqual = '31339';
or $filter->tagsLike = 'xxx';
want work for me too.

Any ideas?

Joined: 02/05/2010
Points: 14

It seems strange to me, because if this is a bug, then it is a BIG bug.

Is there another way to get user medias? If there is not, i think to query database directly (beautiful). I have no other ideas.