Tracking Salesforce API usage quota with Moesif API Analytics

Tracking your Salesforce API usage

Having visibility into digital resources such as 3rd party APIs is key to ensure you are efficiently using those subscriptions and one team does not starve other teams out of their daily or monthly quota. Without visibility, you won’t know which applications are consuming majority of the resources and how to decrease that usage. SaaS like Salesforce place a limit on the number of API calls hitting their open APIs. If you reach quota limits often, instead of just bumping up the Salesforce tier, you may want to get to the root of why the usage limits keeps getting hit.

In this guide, we’ll show you how to set up Moesif API analytics in a few minutes to track your Salesforce API usage.

  • How do you determine the number of API call a specific application or department made over a period of time?
  • How many REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded errors occurred?
  • How do you determine which geographical location the API calls were made from?
  • How can I get insight into an API call that took place on a certain date for one of the connected apps?

In this tutorial we will discuss how to track Salesforce API usage with Moesif.

How to create a Salesforce account/instance

If you don’t have a Salesforce account already, you could create a new account on Salesforce’s sign up page.

Once you log in, the instance your organization uses is indicated in the URL of your browser’s address bar. Example URL:

In this section we will create a series of REST requests. In each request, a base URI will be used in conjunction with the REST resource. The base URI for these examples is

Below we will submit a request to retrieve information about each available Salesforce version.


The output of this request, including the response header -

Content-Length: 88
Content-Type: application/json;
charset=UTF-8 Server:
        "label":"Winter '11"

How to create a Cloud Proxy

Sign into your Moesif Dashboard, and go to Top Right Menu -> Installation -> Codeless Proxy Integration. You will see a box to enter your API domain or host. Moesif’s codeless integration will create a new trackable URL from your original API base URL.

You need to replace the original URL with the new URL and your API requests will be proxied through the cloud proxy network and we’ll see all the requests are being captured by Moesif.


For some reason if we don’t want the application Id in the URL path, we could add the following HTTP Header for every API request:


View the capture event in Moesif

After the configuration is completed, we can use this trackable URL to make requests.

curl -XGET '<ApplicationId>/services/data'

NOTE: The applicationId in the above request should be replaced by your Moesif ApplicationId.

We can verify the events are captured by logging into Moesif and looking at the API Analytics -> Live Event Stream.



Using the above approach, we can track any Salesforce API usage using Moesif and perform advanced analytics.

Learn More About Moesif Accurately Track All API Sales Metrics With Moesif 14 day free trial. No credit card required. Learn More
Accurately Track All API Sales Metrics With Moesif Accurately Track All API Sales Metrics With Moesif

Accurately Track All API Sales Metrics With Moesif

Learn More