What is an API?

An Application Programming Interface (API) is a software intermediary that allows two applications to talk to each other. It allows them to exchange information and communicate using a common language.

APIs are used across almost all software platforms, and Salesforce is no different. When running a Salesforce deployment, APIs do the heavy lifting of moving the metadata between orgs and ensuring everything happens as expected. To interact with an API you generally need to use a command line tool.

The Salesforce metadata API

The Salesforce metadata API is used to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for Salesforce organizations. It's what powers deployments with Ant, Gearset, or any other deployment tool for Salesforce.

The API is supported by Enterprise Edition, Unlimited Edition, Performance Edition, and Developer Edition orgs. Professional edition orgs are not supported.

As the name suggests, the metadata API only allows interaction with org metadata. To retrieve and deploy org data, different Salesforce APIs must be used.

Supported metadata

The API supports the vast majority of Salesforce metadata, including:

  • Apex classes
  • Communities
  • Custom objects
  • Dashboards
  • Documents
  • Email templates
  • Flows
  • Layouts
  • Permission sets
  • Picklists
  • Profiles
  • Reports
  • Settings
  • Translations
  • Value sets
  • Workflows

There is a full list of the supported metadata here.

Any metadata that is supported by the API can be deployed between orgs using a deployment tool such as Ant or Gearset.

Unsupported metadata

While the majority of Salesforce metadata can be deployed using the API, there are a small number of metadata types which are not supported. Any changes to these metadata types must be recreated by hand in each org - they cannot be automatically deployed. 

While this may seem like a significant limitation, the good news is that the metadata types which are not supported by the API are rarely used and this is not a concern for the vast majority of users.

The full list is of unsupported metadata types is available here.

Did this answer your question?