Page 1 of 1

Is this considered by Appery to be 1 or several API calls?

Posted: Sun Jan 11, 2015 1:53 am
by Jon Haider

I am trying to improve version 1.0 of my app and I want to start reducing/consolidating the number of services and API calls that I have. It's a bit bulky and I think it can be optimized.

I am wondering if I reduce (5) calls from the device to the database, into a single call to the server where the server can perform all of the calls to the database, is this considered to be 1 API call (device to server), or 6 (1 from device to server, and 5 from server to database)??
I ask because in the documentation, here, it says an API call is "from a mobile app to any Appery.io backend service". Since the calls to the database from the server are not "from a mobile app", do these not count as API calls, right? :)

I'm hoping by doing this I will reduce the number of API calls, while also making the app a little smaller, with less services, and probably a little faster... Thanks for your response!


Is this considered by Appery to be 1 or several API calls?

Posted: Mon Jan 12, 2015 5:46 pm
by Jon Haider

Anyone?


Is this considered by Appery to be 1 or several API calls?

Posted: Tue Jan 13, 2015 3:11 am
by Yurii Orishchuk

Hi Jon,

If you use server code - it will produce only one Api call.

But in this server code - you should use only Collection methods instead of XHR.send - to new Api.

Regards.