0

I am using the Parse Rest API and i would like to get a count of the total number of objects. I have tried using curl command on the command line by passing in the count=1 parameter as below :

curl -X GET
    -H "X-Parse-Application-Id: <App ID Here>"
    -H "X-Parse-REST-API-Key: <Rest Key Here>"
    https://api.parse.com/1/classes/Restaurant
    --data-urlencode 'count=0'

But i get all the results. In this possible with Parse.com or i will have to use code and count on the client side code?

1 Answer 1

5

If you dont want get all results you can add limit params, like so:

curl -X GET
    -H "X-Parse-Application-Id: <App ID Here>"
    -H "X-Parse-REST-API-Key: <Rest Key Here>"
    https://api.parse.com/1/classes/Restaurant
    --data-urlencode 'count=1'
    --data-urlencode 'limit=0'

Source : https://parse.com/docs/rest#queries-counting

Sign up to request clarification or add additional context in comments.

Comments

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.