Check Your Developer Hub Limits

In this exercise, you will…

  • Use the Salesforce CLI built-in help to see the list of force command topics
  • View help for the force:limits command topic
  • View help for the force:limits:api:display command
  • Check the API limits in your Developer Hub org

Use the Salesforce CLI built-in help to see the list of force command topics

The Salesforce CLI has a lot of topics and commands. The CLI’s built-in help system makes it easy to find out what commands are available and how to call them.

Jargon Alert! With the Salesforce CLI, commands are things that you execute via the CLI. Topics are like folders that hold commands (and even other topics!). All of this helps make the commands implemented by the CLI easier to find and rember.

To get top-level help for the force topic, execute this command:

sfdx help force
Salesforce DX Command / Flags Description
help Special documentation command that provides help for the topic or command that follows it.
force Top-level topic that contains all the topics and commands that are part of the core Salesforce DX plugin library.

Your CLI Screen Should Look Something Like This:

View help for the force:limits topic

Execute this command:

sfdx help force:limits
Salesforce DX Command / Flags Description
help Special documentation command that provides help for the topic or command that follows it.
force:limits Topic containing commands for inspecting various org-based limits

Your CLI Screen Should Look Something Like This:

View help for the force:limits:api:display command

Until now, you’ve been using the help command followed by the command or topic we wanted to learn about. You can also add the -h or --help flags to any command to get the same result.

Execute this command using the -h flag to see the built-in help for it:

sfdx force:limits:api:display -h
Salesforce DX Command / Flags Description
force:limits:api:display Displays remaining and maximum calls and events for your org.
-h (--help) Special flag available on all topics and commands. Instead of prepending your command with help, you can add the -h flag to open help for that command

After executing the above, your terminal should look something like this:

Check the API limits in your Developer Hub org

Now that you’ve seen the help on how to use it, go ahead and execute the force:limits:api:display command against your DevHub to see it’s API limits usage.

Execute this command:

sfdx force:limits:api:display -u DevHub
Salesforce DX Command / Flags Description
force:limits:api:display Displays remaining and maximum calls and events for your org.
-u (--targetusername) A username or alias for the target org. Overrides the default target org.

Your CLI Screen Should Look Something Like This:

Important Note: Dev Hub orgs have two special limits: ActiveScratchOrgs and DailyScratchOrgs.
“Active” scratch orgs are the total number of scratch orgs that you can create and leave existing at one time.
“Daily” scratch orgs reflects the number of times each day that you can create a new scratch org.

Updated: