6

I've read plenty of Salesforce articles about the rolling 24-hour limit on API calls, but the information provided by Salesforce doesn't match up with what I've seen. For several days, I've had a machine requesting the number of API requests every 60 seconds from the Company Information page. My initial expectation was that this number should steadily increase if yesterday's usage was lighter from that time of day, decrease if the app was under more use 24 hours ago, or hover at a roughly constant amount in the unlikely scenario that we're hitting the API just as hard today as we did yesterday.

Instead, this is the general pattern I see:

Five hours of API calls

This implies that the total number of calls that Salesforce shows when I request the 24-hour total is not actually 24 hours worth of calls, but instead 24 hours plus or minus a few minutes to round it to the nearest hour (not sure which). I've found one article that supports that idea, but even that can't be the full story. Here's another snippet of the total requests over time:

No hourly reset

Each day's worth of data I have includes multiple hours where there's no drop on the hour, sometimes four hours in a row. Additionally, there are a few cases (usually just after midnight) where an extra drop occurs on the quarter-hour or half-hour.

This is only a problem because we have a particularly API-hungry application that's bringing us dangerously close to our call limit. These inconsistent drops make it difficult to predict where we stand at any given time. So until we can get our chatty legacy app reigned in...

How exactly does Salesforce calculate the number of API requests for the last 24 hours?

3
  • Eric, Have you seen this
    – abhi
    May 24 '16 at 18:10
  • Yes, unfortunately the information there is incorrect (or at best, a simplification). From the page: "For example, if you are viewing this on Monday at 2:30 PM, it'll show you the calls made since Sunday at 2:30 PM."
    – Eric Dobbs
    May 24 '16 at 18:23
  • 1
    Maybe submitting a case to have your API call limit increased will solve your need to worry about this tight usage? Not an answer I know but they will increase it for you within reason and you would not have to monitor it so closely.
    – Eric
    May 24 '16 at 22:33
0

FWIW, I did the following experiment:

  • Did some API requests up to 16:15
  • Stopped doing any requests for 24h

Usage was down to zero at 16:00 next day.

So it looks like it keeps track of how many calls were made each hour and forgets about hour T-24 as soon as hour T-0 begins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.