Deploy API Catalog Data Using Change Sets

After you create, test, and debug your API Catalog configuration in a sandbox, use a change set to send the catalog and its associated dependencies, such as external services entries and named credentials, to production when you’re ready to deploy.

Required Editions

Available in: Lightning Experience
Available in: Developer, Enterprise, Performance, and Unlimited Editions
User Permissions Needed
To access API Catalog:

Available to Salesforce admins by default.

For other users, View Setup

To edit deployment connections:

Deploy Change Sets

AND

Modify Metadata Through Metadata API Functions

To use outbound change sets: Create and Upload Change Sets
To use inbound change sets:

Deploy Change Sets

AND

Modify Metadata Through Metadata API Functions

Important
Important You can’t use managed packages to promote API Catalog data from org to org. The authentication data necessary for API Catalog can’t be retained and installed in a separate org, and you can’t edit the authentication information installed through a package in the target org.
  1. Create an outbound change set in the source org for the API Catalog entries you want to deploy to another org. See Outbound Change Sets.
  2. Add Cataloged API to the change set and then select the catalog entries to include in the change set.
    The dependencies are automatically selected for you.
  3. Upload your outbound change set.
  4. Deploy your inbound change set in your target org. See Inbound Change Sets.
  5. Make sure MuleSoft API connections that are in Custom status have valid external credentials, because API Catalog can’t automatically verify or create those during the connection process. See Create and Manage Connections for Your APIs.

Deploy Change Sets Using Salesforce CLI

You can alternatively deploy change sets using Salesforce CLI commands.

  1. Create an empty Salesforce DX project. See Salesforce DX Developer Guide: Create a Salesforce DX Project.
  2. Create a package XML file that has these metadata API components as shown in the example.
    • CatalogedApi
    • CatalogedApiVersion
    • CatalogedApiArtifactVersionInfo
    • ExternalServiceRegistration
    • NamedCredential
    • ExternalCredential
    • PermissionSet
    • Flow
    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
        <types>
            <members>*</members>
            <name>PermissionSet</name>
        </types>
        <types>
            <members>*</members>
            <name>ExternalCredential</name>
        </types>
        <types>
            <members>*</members>
            <name>NamedCredential</name>
        </types>
        <types>
            <members>*</members>
            <name>ExternalServiceRegistration</name>
        </types>
        <types>
            <members>*</members>
            <name>CatalogedApiArtifactVersionInfo</name>
        </types>
        <types>
            <members>*</members>
            <name>CatalogedApi</name>
        </types>
        <types>
            <members>*</members>
            <name>CatalogedApiVersion</name>
        </types>
        <types>
            <members>*</members>
            <name>Flow</name>
        </types>
        <version>65.0</version>
    </Package>
  3. Pull the package into your local project to create a change set by using the sf project retrieve start command.
    This example creates a change set in a source org with the org ID mySandboxOrg.
    sf project retrieve start --manifest package.xml --api-version 65.0 --target-org mySandboxOrg
  4. Deploy to the target org by using the sf project deploy start command.
    This example deploys the change set to a target org with the org ID myProdOrg.
    sf project deploy start -o myProdOrg