function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adam LewitesAdam Lewites 

API Limit Being Exceeded - Salesforce has given me no answer. HELP!

I've been notified almost everyday, that my teams daily API limit is being exceeded, Salesforce cannot give me an answer of why, and the 7 day report does not match Salesforce's records; I have been dealing with this for over two weeks now, and essentially has caused our business to come to a halt. We can't operate in an optimal fashion and our numbers have drecreased becasue of this. Its essentially become a business stopping issue and I don't believe my request is very difficult.

Very simply, all I'm only looking to figure out 2 things: 1) See my teams daily API Average  2) The source that is eating up all of our API Calls

I can't stress enough how easy of a request this seems to be and Salesforce has been of no help at all. Our SF Account Exec has been awesome and hustling to try to get an answer, but to no avail. No one else internaly is willing to give us an answer, so I ask the community... Any ideas? Thanks! 
Anil SavaliyaAnil Savaliya
Hey Adam,

I don't what API limit hitting your organization,But for API usage ang get alert Use API usage notification feature proving by salesforce.

You can find it through setup-admin setup-motitouring-API usage notification.

Please provide detail what API usage limit hitting your organization.
ericmonteericmonte
Adamn, can you tell me more about your enviornment and edition? Just to help you out here is a good documentation:

http://help.salesforce.com/apex/HTViewHelpDoc?id=integrate_api_rate_limiting.htm#concurrent_limits_title

Do you think you can screenshot your environment API limit you can go through setup --> Company Profile and just screen shot this section:
User-added image


Do you have a middleware in your system that are integrating with your environment? I've also ran some similar issue in the past where an external system was hitting my SFDC environment several times with 1 million API request in 24 hours.

You can also ask SFDC Help to send you a report of all the APEX and API limits being consumed by your environments. And the 7 days reports are a little tricky to work with because those are based of the 24 hour streaming api limits. For example if you hit an api now it will not roll off until tomorrow so they might be counting it properly.

The best advice i can give u is to check with SFDC on giving you a breakdown on what transactions are being hit in to your environment.
Then check any middleware you have to make sure they are not hitting you several times and if they are doing bulk load make sure they use the bulk transaction method.

Also, you can ask SFDC to up your limit temporarily until u figure out the Root Cause for this. If you want to talk more on details on this feel free to send me a PM.
Adam LewitesAdam Lewites
Thanks, Eric. We're on the professional edition but have bought an add-on with API requests. We upped it to 30,000 requests and consistentaly hit those limits. Below you'll see the screen shot of our API Requests in the last 24 hours. SFDC has given us a temporary increase to 160k to see where it settles, but quite honestly, its consistantly going up. We do use a few different tools the one that I imagine might be middleware (correct me if I'm wrong) is Cirrus Insight. We also use Pardot, Tout, among a few other tools.



User-added image


My point in the original message is that Salesforce has been useless in getting me a simple breakdown I've asked for. They haven't been able to point me in any reasonable direction. This is why I'm now posting on the forum to hope people will be able to help. 
Saurabh DhobleSaurabh Dhoble
Run the below query in developer console to see a breakdown of what applications/users are hogging your API calls -
select APiType, Application, UserId, Count(Id) from LoginHistory 
WHERE DAY_IN_MONTH(LoginTime) = 14 and CALENDAR_YEAR(LoginTime) = 2014 and CALENDAR_MONTH(LoginTime) = 5
GROUP by APiType, Application, UserId
Note that you only need to worry about records with APiType in ('SOAP Enterprise', 'SOAP Partner') - Salesforce doesn't allow me to filter on these APIType values in the query, for whatever reason. You can change the date/month/year to see the usage on different days of the year.

Also note that the counts here will NOT match your API hit count - this is because the above gives you a login count. A user account may log in once, but then make multiple API calls within the same login session. BUT, it should give you a good idea of who the culprit is.

Few other fields that you can query on the LoginHistory object to get a better idea of your API calls - Browser, LoginTime, LoginType, LoginURL, Platform, SourceIp.

Lastly, I'm on a mission to add points to my profile, so *please* mark this as answer if it answers your questions :).
ericmonteericmonte
Adamn,

When I requested support from SFDC, they were able to pull the following information:

API limits by:
User Id
Top 10 values #s of using API
Objects being hit through API and what's the current percentage
Controllers invoking API
IP address using API to hit your system

So if they are able to provide you with this data, you can figure out what's causing some of this issues. I'm going to guess it might be the sync of Cirrus Insight.

Let me know if you get an answer from SFDC. Also, it's best if you ask for High Tier support that has some experience on API limits and restriction.
Chris Wolf 10Chris Wolf 10
Someone should give @Saurabh Dhoble some credit - SOQL query totally helped me narrow my API usage investigation!
Lorianna SpragueLorianna Sprague
I tried to use the developer console and the query from Saurabh Dhoble, but I have to have available API calls to run the query, soooo - I can't use that. I am having the same issue - no help from support, and no visibility. I have two systems using the API to SFDC - Marketo and Openprise. Openprise engineers are certain they are not the culprit, and the Marketo sync user isn't the one racking up all the API calls. The user racking up all of the API calls is mine, but it's not connected to anything that should be using the API like that. This is beyond frustrating. I need visibility to see what program/system is making the calls through my user so I can shut it down. It's preventing Marketo and SFDC from syncing and we have to create all new leads manually and route them to the assigned AE. Can anyone provide guidance on this?