Backendless Support
 
Answered

What counts as API call?

Hi all,

Can someone tell me what counts as API call. At the moment my application calls 4 different Cloud JS handlers and stores 10-15 files for one set of information. So lets say I call the API 20 times from my software. Also there are running other tasks which do 10 calls per minute to poll for information from other Cloud JS handlers. So in one minute I could have 30 calls.

But now I get a API calls/min threshold reached message nearly all the time I store a set of information. So what else is counted as API call? Every time I call a Backendless.Persistence method to get/save data to the Database? And set/update relations? Also email sending?

At the moment I'm working with a Developer Plan, so there is headroom, but in this case it sounds my application would never fit into the Cloud 9 and 99 plans when more than 5 users are active at a time.

Thanks for the information

Leave a Comment

Comments (6)

photo
1

Do also count Backendless.Files.Permissions.XXX and Backendless.Logging calls?

photo
1

Hi Jonas,

As a general rule any HTTP/S request made to Backendless is an API call.

Regards,

Mark

photo
1

Hi Mark,

do the calls to the database etc. count also as http requests? Otherwise I cannot explain how I get to my high API call count.

This night, only a sync service was polling every minute the my backendless API. It does 3 calls: Login, Catch information and logout. The statistics in the console says 15 calls per minute constantly over the night.

What causes that?

photo
1

Ok, it seems that in the Cloud JS code also every Backendless.* call counts. Removed 3 logging lines and now getting constant 12 calls/min :/

photo
1

Hi Jonas,

Any call to Backendless API counts as an API call including retrieve/create/update/delete calls to the database. You may take a look at the analytics (Manage > Analytics) to see the API calls usage

Anton

photo
1

Hi Anton,

yeah, I saw that page, but didn't thought every single entry in there is counted as a API call. Thought all things you do in the Cloud JS code with the Database, Logging, User service etc, is "free" as it already runs on your servers.

But in this case I have to think about how to optimize my code. As setting user file permissions for 20 users for each uploaded file (as I said can be 15 files) is veeeery expensive in the end with minimum 3 calls per user to Backendless.Files.* :/

Thanks for the information.