Getting REST APIs to Work with Back4App

654 views
Skip to first unread message

adrian...@gmail.com

unread,
Feb 1, 2017, 10:16:27 PM2/1/17
to back{4}app
Hi,

I just started a test application to handle REST calls. I seem to have a hit a roadblock trying to get it to work. I did take a look at some of the past conversations in the forum. I don't think I need to turn on LiveQuery, which I would like to avoid.

Below is the call I am making:
curl -X PUT -H "X-Parse-Application-Id: ID" -H "X-Parse-REST-API-Key: Key" -H "Content-Type: application/json" -d '{"Score":9}' https://parseapi.back4app.com/classes/UserScores/<ObjectID>

Can you advise if there is something that I am missing?

Thank you advance for any guidance you might have!
Adrian



casag...@back4app.com

unread,
Feb 2, 2017, 6:18:42 AM2/2/17
to back{4}app, adrian...@gmail.com
Hello!

What error are you facing on that request?

Best!

Ad Wi

unread,
Feb 2, 2017, 7:50:26 AM2/2/17
to casag...@back4app.com, back{4}app
Hi,

The strange thing is that I don't get any response back. Neither is my record updated.

I did try to force a syntax error and I do a get response from curl. So curl does seem to be working.

Thanks

adrian...@gmail.com

unread,
Feb 2, 2017, 7:45:52 PM2/2/17
to back{4}app, adrian...@gmail.com

Hi,

Any thoughts on this issue?

I also tried a simple GET:

curl -X GET -H "X-Parse-Application-Id: ID" -H "X-Parse-REST-API-Key: Key" https://parseapi.back4app.com/classes/UserScores/<Object Id>

No response from the server.

Would appreciate any help or guidance. Our team is kinda scratching their heads on this one because it is simple call without any error response.

Thank you.

adrian...@gmail.com

unread,
Feb 2, 2017, 7:47:14 PM2/2/17
to back{4}app, casag...@back4app.com, adrian...@gmail.com
Hi,

Any thoughts on this issue?

I also tried a simple GET:

curl -X GET -H "X-Parse-Application-Id: ID" -H "X-Parse-REST-API-Key: Key" https://parseapi.back4app.com/classes/UserScores/<Object Id>

No response from the server.

Would appreciate any help or guidance. Our team is kinda scratching their heads on this one because it is simple call without any error response.

Thank you.

Adrian W

unread,
Feb 2, 2017, 8:14:22 PM2/2/17
to back{4}app
Hi, wanted to give an update on this.

We did get it to work with python.

For benefit of the community, the connection request looked like this:

connection.request('PUT', '/classes/UserScores/<ObjectID>', json.dumps({

"Score": 7

}), {

"X-Parse-Application-Id": "Your App ID",

"X-Parse-REST-API-Key": "Your REST API Key",

"Content-Type": "application/json"

})



Thanks!


Davi Macêdo

unread,
Feb 2, 2017, 9:00:02 PM2/2/17
to back{4}app, adrian...@gmail.com
Good to know, Adrian. Thanks for the feedback!



Reply all
Reply to author
Forward
0 new messages