At times you'd want to understand in detail how various apps use the Salesforce API. This article explains how to do that step-by-step.
API Usage Overview
For API usage overview you could go to Setup -> System Overview to see how many API calls have been made in the last 24 hours.
Similarly in Reports -> Administrative Reports the "API Usage Last 7 Days" report shows the calls made by user and date for the last 7 days including today.
API Usage breakdown by App
For granular API usage by app, Event logging can be used.
Here are the steps to get detailed API usage data:
- Log into Salesforce Workbench: https://workbench.developerforce.com/login.php (this is a Salesforce tool, see screenshots below)
- Go to "queries" and then "SOQL Query"
- Issue the following query: SELECT ApiVersion,CreatedById,CreatedDate,EventType,Id,IsDeleted,LastModifiedById,LastModifiedDate,LogDate,LogFile,LogFileContentType,LogFileFieldNames,LogFileFieldTypes,LogFileLength,SystemModstamp FROM EventLogFile
- In the "LogFile" column, double-click on the very long string to copy it to the clipboard.
- Paste that long string into Base64 decoder (like this tool) and click "Decode" to translate the string to plain text csv format.
- Copy the plain text to any text editor and save it as log.csv
- Open log.csv in Excel or similar, look at the last column named SOURCE_IP, that's the IP of the app that made the API call.
- Aggregate and analyze API calls by date, time, and SOURCE_IP.
Additional Information from Salesforce
- FAQ about API usage: https://help.salesforce.com/articleView?id=000003706&type=1
- Trailhead: https://trailhead.salesforce.com/en/modules/event_monitoring
- API: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/using_resources_event_log_files.htm
Workbench tool by Salesforce (step 2 above)
Workbench tool query (step 3 above)
Base64 decoding (step 5 above)
Insycle is a complete customer data management solution that makes it simple for companies to manage, automate, and maintain clean customer databases. This allows their teams to execute more efficiently and improve reporting, knowing the data is accurate and formatted properly.