Reputation: 1069
How are Parse API requests quantified exactly?
I'm using Parse for my backend and I have a cloud job that updates all of the objects in my DB every ~5 hours. it goes through each object and updates the score
field.
On the front end, when users hit a page, the client requests 9 objects from parse, then get
is called on each object several times to get the various fields within each object.
For example, query.find()
will return a photo object. I call photo.get('name')
, photo.get('size')
, etc..
I've looked online and haven't been able to find a clearcut answer on what is considered an api request with Parse. Any help?
Thanks
Upvotes: 1
Views: 227
Reputation: 674
When you query multiple objects in one query this will just use one API request. Calling get on the objects that are returned won't use any extra API requests because these objects and their values all will be stored in memory. However, if you were to save each of these objects, even if you used the saveAll feature, you will use one API request per object saved. Furthermore, anytime you call a cloud function you are using an API request just to call that cloud function. So if you run a cloud function where you query lots of objects and then update these objects, you will use one API call for the cloud function, one API call for the query, and as many API calls as objects you query.
Upvotes: 1