API calls will be different from one site to the next based on Door numbers and card holders and also how busy the site is on a day to day basis.
We had made the solution as efficient as possible with API calls as this is part of the solution that adds up.
For the most part, allot of calls are used when starting the event server and synching the states.
Also, we need to re-cache the users when the event server is restarted, so browsing the users and getting their pictures will make API calls, but we do by load pages of users.
Once the system is running, Brivo provide state updates for the doors so we don’t make API calls for all the state updates and changing the icons. You can check with Brivo but I don’t think they charge for event notifications.
We do make API calls for:
- Getting user (user pages, get cached. Auto refresh after [UserCacheInvalidationHours]
- Getting individual user pictures (one call per picture, but gets cached)
- Loading the initial configuration (access point pages)
- Refresh all states when event server restarts or network connection is restored.
It really depends on how active the site is. We do log `Total API calls:` directly in the Event Server MIPS log every time there is an API call, so after a few days, weeks you can estimate the average. But then again, Brivo keep track of this as well.
We did try to optimize this as much as possible so that customers do not get charged needlessly.
### Info from Brivo
The type of subscription (TX0 - TX3) is typically dependent on the size of the Brivo account and how often Milestone needs to communicate with the API.
Activating the API is account wide so that will cover all sites and panels included in that account.
I have added a breakdown of the API subscriptions below:
Each API key subscription operates on a rolling 30-day period with a set amount of calls during that period. If the customer nears their 30-day limit, approximately 80%, the owner of the Brivo Developer account will be notified via email.
If the API key surpasses its 30-day limit, the application attached to that key will cease to communicate with the API until its allowance is restored. It is important to make sure that the customer and the integrator understand these limits and that the appropriate subscription is used to maintain operations.
The subscription tiers are as follows:
**Tier 0 - 100,000 calls per rolling 30 days**
**Tier 1 - 500,000 calls per rolling 30 days**
**Tier 2 - 1,000,000 calls per rolling 30 days**
**Tier 3 - 2,000,000 calls per rolling 30 days**