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
Nomios SupportNomios Support 

Where do API requests come from?

Hi there,

we have been reaching the limitation of API request : 15000

Support extended the value to 25000 until thursday, but waiting for that, we want to identify and decrease the number of API calls, because it prevents us from working, and service goes totally down.

We reached the limitation on sunday, while we were not working for more than 48 hours. Everything was working fine on friday, as we were working all day long.

This behavior is really abnormal, and we would like to know how it could have increased that much, without touching anything. 

Thank you very much
Jean
NagendraNagendra (Salesforce Developers) 
Hi Nomios,

Hope the following knowledge article will be helpful to you.

Knowledge Article Number: 000003706 

Description

I would like to know what counts towards my API limit and how I can reduce my API calls usage. 

Resolution

1. What counts towards my API limit?

SOAP (https://www.salesforce.com/developer/docs/api/Content/sforce_api_calls_list.htm) and REST API calls (which include Bulk API calls) are counted against an organization API call limit.

2. How can I reduce my usage of API calls?

There are different approaches to reduce the amount of API calls consumed by a given API client, which include (but are not limited to) the following: a) caching on the client side, b) sending cumulative changes, rather than incremental changes, c) resort to the Bulk API to mass upload/update records, instead of using the REST API to upload/update the same records.

3. Where can I get information on how many API calls were made in my org?

System Overview

Go to Monitor | System Overview and there you will find the API REQUESTS, LAST 24 HOURS. This shows you how many API calls you've made in the last 24 hours including today. 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

The "API Usage last 7 days" report

The "API Usage last 7 days" report shows you the calls made by user and date for the last 7 days including today. Take into account that the counters for this report reset at 12am Greenwich Mean Time (GMT) or UTC.

NOTE: This report displays SOAP API usage, but REST API (including Bulk API) calls are not included in the report, which might explain why the data displayed in the report does not match the figure returned by the System Overview page.

Event logging

For more granular information, Event logging can be used. Refer to http://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_eventlogfile.htm for more information.

4. How can I use these two together to understand more about my API usage?

Here's an example of how you can use these two tools together: 

Assume today is Wednesday and you go to Monitor | System Overview and you see the following

API REQUESTS, LAST 24 HOURS  25,000  

This means that in the last 24 hours taking into account today, you have used 25K API calls. You can then go to the "API Usage last 7 days" report and see how many calls you have done on Wednesday (today) and  part of Tuesday. You are likely to see something like this

Wednesday: 15,000
Tuesday: 20,000

You need to take into account that the number for Tuesday shows all the calls on Tuesday, but the System Overview number doesn't take into account all calls from Tuesday, only the ones within the last 24 hours. So the calculation is something like this:

Wednesday 15,000 + some calls from Tuesday 10,000 (starting from the last 24 hours) = 25,000


For more info - https://help.salesforce.com/HTViewSolution?id=000003706&language=en_US (https://help.salesforce.com/HTViewSolution?id=000003706&language=en_US)


HOW DO I OPTIMIZE THE NUMBER OF API CALLS FOR MY INSTANCE?

When installing Spanning Backup for Salesforce, your instance is automatically set up with a limit of 15,000 API calls per day, to ensure that Spanning Backup does not exhaust the API call limit for your instance.  You can increase or decrease the API calls limit in your Spanning dashboard.

Spanning can back up between 200-1000 records in your account per API call (depending on how many fields are in each record), with the exception of Attachments, as we are only able to back up one attachment per API call.  So, we recommend editing the Spanning API call limit accordingly, so that Spanning can backup all of the data in your account in a timely manner without exhausting all of the API calls in your Salesforce instance.

In order to help determine the correct number of API calls for your instance, you can first check the number of available API calls in your Salesforce instance.  To do so, follow these steps:
  • Log into your Salesforce account as the admin user
  • Click the Setup button in the upper-right corner of the screen
  • In the left-side navigation panel, navigate to Monitor > System Overview (if using Salesforce Lightning, navigate to Environments > System Overview)

The API usage is listed in the top right and lists a percentage used and the maximum (see screenshot below):
User-added image
Additionally, you can investigate how many total attachments are in your instance by following the steps below:
  • Log into your Salesforce account as the admin user
  • Click the Setup button in the upper-right corner of the screen
  • Click the 'Data Management' button in the left-panel navigation pane
  • Select the Storage Usage option from the sub-menu
Here, in the 'Current File Storage Usage' sub-heading, you will see the number of Attachments (see screenshot below):

Note: If using Salesforce Lightning, follow these steps instead:
  • Log into your Salesforce account as the admin user
  • Click the Setup button in the upper-right corner of the screen
  • Navigate to Data > Storage Usage
  • Here, in the 'Current File Storage Usage' sub-heading, you will see the number of Attachments (see screenshot below):
User-added image
It is important to remember that the initial backup of your Salesforce data takes the longest to complete, as we are backing up all of the data in your account.  After the initial backup completes, all of your subsequent daily backups will complete much faster, as we will only be backing up new and changed data.

Please note that if the Spanning API limit is set too low, then it may take many days for the backups to complete, as the API limit will be reached before the backups complete.  If the Spanning API limit is set too high, then Spanning may use a larger portion of your organization's API calls then you are comfortable with, which may result in other applications that need API calls failing.

Additionally, please remember that you can always update the number of API calls that Spanning uses, so after your initial backup completes, you can recalibrate this number to not use as many API calls.

Please mark this as solved if it's resolved.

Best Regards,
Nagendra.P