Result search problem

Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
Hello,

I have 2 differents results with the same request.

For exemple: With the master Key, the json result is :

{"code":200,"text":"OK","data":{"_items":[{"_created":1444825069,"_updated":1444825069,"Annee":1986,"titre":"mario"}],"info":{"limit":10,"total_items":1}}}



With an other user login in (client key), the json result is:

{"code":404,"text":"Not Found"}


Can you explain this ?


updated by @black-eagle: 01/20/16 05:19:32AM
paul
@paul
9 years ago
4,331 posts
Hi
It's likely that the resulting profile is not visible to the user, maybe because of its privacy settings?
Master admins alway see all results.
Hope that helps


--
Paul Asher - JR Developer and System Import Specialist
Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
Hi Paul,

The maintenance mode can do this ?
brian
@brian
9 years ago
10,148 posts
With the master key you can (of course) update ANY record in JR. When using the Client Key however, there are restrictions in place:

1) The user MUST have a valid session (i.e. they have logged in)
2) Only THEY will be able update their own user information key/value pairs

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
OK

So, if I create (no update) an item with the master key, this item will not be visible in users' search results ?

Is it possible to disable the update and delete function of the master key? I prefer to do the item's update from the jamroom control panel.

Thanks.
updated by @black-eagle: 10/17/15 10:18:53AM
Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
I an other problem:

My item value

_created: 14 Oct 2015 14:17:49
collection: Jeux
_p: 2
_updated: 14 Oct 2015 14:17:49
Annee: 1992
description: The Legend of Zelda : A Link to the Past est un jeu d'aventure sur Super NES dan...
developpeur: Nintendo
fanart: url 2
jaquette: url 1
plateforme: Super Nintendo
titre: The Legend of Zelda : A Link to the Past

This request work fine :
http://www.game-emul.fr/api/data/Jeux/search?search1=annee%20in%201992
Result : {"code":200,"text":"OK","data":{"_items":[{"_created":1444825069,"_updated":1444825069,"Annee":1992,"titre":"The Legend of Zelda : A ........

But, this request don't work :
http://www.game-emul.fr/api/data/Jeux/search?search1=plateforme%20eq%20Super%20Nintendo
or
http://www.game-emul.fr/api/data/Jeux/search?search1=plateforme%20in%20Nintendo
Result : {"code":404,"text":"Not Found"}

The value does exist, why is it not found ?
updated by @black-eagle: 10/17/15 10:17:40AM
brian
@brian
9 years ago
10,148 posts
I just tested with your value here and it is working for me - here's my search:

api/data/unit_testing/search?search=plateforme%20eq%20Super%20Nintendo

Make sure there are no leading/trailing spaces in your POST that could be getting added to the value.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
I try again but don't work. I don't understand.
brian
@brian
9 years ago
10,148 posts
Black-Eagle:
I try again but don't work. I don't understand.

Are you doing your search with the Master Key? If not, then make sure you are using the SAME user session for both POST and GET. By default when an object is created in a data collection, it is only visible to the user that created it (or the master key).

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
Yes, I use the Master Key for my search request.
brian
@brian
9 years ago
10,148 posts
Black-Eagle:
Yes, I use the Master Key for my search request.

It should be working then - since it is not I can only assume that what is actually STORED in MySQL for that key has some extra padding or spaces on it - can you look in the jr_jrproximadata_item_key table and double check the value has been stored correctly?

If you still cannot get it to work I'd have to have access to your site to test it on - send me an email to support [at] jamroom [dot] net with your server info - I will try to check it out when I get a chance.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Black-Eagle
Black-Eagle
@black-eagle
9 years ago
57 posts
OK Brian.

I send you an email. You can try to check. My website is closed for tests. This is not urgent.

Thanks you.

Tags