You might have seen the important announcement from the PowerPlatform team about how there are new API limits to be in effect from the 1st October 2019.
We have been somewhat spoilt in past years with very little throttling on how much we can use the API, but now in order to encourage fair usage there will be a limit on how many times you can call the PowerPlatform API in a 24hr period, depending on the license you have:
||Number of API requests / 24 hours
|Dynamics 365 Enterprise applications
|Dynamics 365 Professional
|Dynamics 365 Team Member
|PowerApps per user plan
|Microsoft Flow per user plan
|Office licenses (that include PowerApps/Microsoft Flow)
(taken from https://docs.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations#what-is-a-microsoft-power-platform-request)
There is a section in the article that calls out what a PowerPlatform Request is and it seems to be quite clear that it's any Connector calls, Flow Step Actions, and CDS API CRUD type calls.
How does this affect Model-Driven Apps and WebApi calls?
One of many improvements of the Unified interface over the legacy Web UI is that it is much less 'chatty' to the server - but there are still ~10 calls for a simple contact form load once metadata has been loaded and cached.
If I filter the network requests to '/api/data/v9' when opening a Unified Client Contact form with no customisations, I get 17 requests:
On examination of these requests, there are some requests that will not count as an API Call:
- 304 Not modified requests - where data is cached (4)
- Calls to 'special' actions such as 'GetClientMetadata' which will not count as an API call (2)
- Calls to UpdateRecentItems (1)
This leaves 10 calls to the Web API endpoint, all of which will count towards the API limit. It's worth noting that the $batch calls only count as a single API Call even though they can contain multiple requests.
What does this mean in 'Real Terms'?
Let's assume the following:
- A user has a Dynamics 365 Professional license giving them 10,000 API calls/day
- There are no Flows, CanvasApps, Workflows, Plugins that are running under their user identity
- There are no customisations made to the standard 'Sales Hub' contact form.
- There are no other ISV products installed
Assuming this, the user would be able to open approximately ~1000 contact records before they hit the API limit.
This equates to opening ~2 records a minute assuming that the user is opening records constantly for 8 hours straight! 🤣
The good news is that Users will not be blocked if they exceed the limit, the environment administrator will be notified so that they can take action and perhaps purchase an API Limit add-on (details of which are yet to be published but I'll update this post when they are).
Custom vs First Party
The key takeaway here is that the new limits do not differentiate between custom calls to the WebApi made by the out of the box code and custom code.
Xrm.WebApi.* from inside your Model-Drive Apps will count as an API call alongside the 10 calls we see above.
Call to action!
Note: I will update this post if I hear of any changes that come down the line from this announcement.