The Metadata API

A brief introduction to the Salesforce Metadata API

Jason Mann avatar
Written by Jason Mann
Updated over a week ago

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 here of the metadata that Gearset is able to support.

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

Occasionally, there may be new metadata types that are compatible with the metadata API, but not currently compatible with Gearset. For example, it may be a new Salesforce metadata type that we haven’t yet integrated. If you think your metadata type falls under this category, please feel free to contact us, and we may be able to add support for it.

Unsupported metadata

While the majority of Salesforce metadata can be deployed using the API, there are a few metadata types that aren't supported. Any changes to these metadata types must be recreated by hand in each org. They can't be automatically deployed. 

While this may seem like a significant limitation, the good news is that the metadata types that aren't supported by the API are rarely used, so this isn't a concern for the vast majority of users.

The full list of unsupported metadata types is available here.

Did this answer your question?