Page 1 of 2

Specific User Details Not Working

Posted: Mon Sep 02, 2013 5:34 pm
by Doug Black

I've created a service to query a Users details. No matter what I do, it just keeps giving me a 405 error or a 400 error.

Image

Image

Image

Image


Specific User Details Not Working

Posted: Mon Sep 02, 2013 5:42 pm
by Maryna Brodina

Hi, we'll test and let you know.


Specific User Details Not Working

Posted: Mon Sep 02, 2013 6:24 pm
by Maryna Brodina

It works for me.
1) Users in your service URL should start with lower case letter;
2) try to specify user's id (_id parameter) in service URL - http://docs.appery.io/documentation/b...
Image


Specific User Details Not Working

Posted: Mon Sep 02, 2013 6:37 pm
by Doug Black

No, still doesn't work. Get the same error.


Specific User Details Not Working

Posted: Mon Sep 02, 2013 6:42 pm
by Maryna Brodina

Please try to specify user id in URL as shown here http://docs.appery.io/documentation/b.... Example of URL codehttps://api.appery.io/rest/1/db/users/5000ad45e4b0452929274b9a/code

where 5000ad45e4b0452929274b9a - user's id from your DB.
Also could you clarify how do you send X-Appery-Session-Token? Do you map it to localStorage?


Specific User Details Not Working

Posted: Mon Sep 02, 2013 6:50 pm
by Doug Black

This is what was returned. It gave a 400 error:

https://api.appery.io/rest/1/db/users...

Yes, the Session Token is in the local variable as "token"


Specific User Details Not Working

Posted: Mon Sep 02, 2013 6:55 pm
by Maryna Brodina

Please check that you've set X-Appery-Database-Id in settings service.


Specific User Details Not Working

Posted: Mon Sep 02, 2013 7:06 pm
by Doug Black

Nope, same thing!
Image

Image


Specific User Details Not Working

Posted: Mon Sep 02, 2013 8:28 pm
by Maryna Brodina

Most likely you've added incorrect User ID. We reproduced 400 error with incorrect _id parameter value. To get more information on this error please open Chrome Developers Tool console (Network tab) and check JSON you receive from server
Image


Specific User Details Not Working

Posted: Mon Sep 02, 2013 9:07 pm
by Doug Black

Wow...

Actually I had put a hyphen where an underscore needed to be.

Thanks for keeping me checking, and for all your assistance!