1

Using the rest API for parse.com, however, struggling to get the where clause to work properly. I've read through their documentation, but don't understand why I'm not getting results. I get a 200 status, but no results.

curl -X "GET" "https://api.parse.com/1/classes/companies?limit=10000&where=%7B%22company_id%22%3A%221%22%7D" \
-H "X-Parse-Application-Id: 444444" \
-H "X-Parse-Master-Key: 444444"

Basing this on their query constraints found here

1 Answer 1

1

Try:

curl -X GET \
-H "Content-Type: application/json" \
-H "X-Parse-Application-Id: 444444" \
-H "X-Parse-REST-API-Key: 444444" \
-G \
--data-urlencode "where={\"company_id\":\"1\"}" \
--data-urlencode "limit=10000" \
https://api.parse.com/1/classes/companies

Note: Either consider using REST key, or change relevant line to master key.


Additionally, you have a nice curl request generator under API Console tab in your Parse project, and the URL to it will look sth like:

https://www.parse.com/apps/<PROJECT_NAME>/api_console
Sign up to request clarification or add additional context in comments.

1 Comment

In my code above, if I remove the company_id constraint, the limit works fine. company_id is listed as a string. Do I need to do something more to get it to work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.