Create and Manage Connections for Your APIs
Create connections to authorize the use of actions you activate for MuleSoft APIs and HTTP callouts in Salesforce. You create connections for other external API sources from outside of API Catalog, and then you can view the connections from the catalog.
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 |
Create connections before you activate an action for your APIs. If a MuleSoft API doesn't have a connection yet, when you activate actions for the API, you're led through the create connection process.
- In Salesforce, from Setup, in the Quick Find box, enter API Catalog, and then select API Catalog.
- Select the MuleSoft API that you want to activate actions for.
- To create the connection and activate actions, click Activate Actions.
- Select the API version.
- To customize the default connection label and name, overtype them.
- Enter a description.
-
Select a destination URL (API instance) to use as the managed named credential for this
connection to Salesforce. If you can’t access a destination that you select, ask your
Anypoint Platform admin to approve the access and check the status again. Select an SLA
tier if needed. See MuleSoft Documentation: Client Applications,
Contracts, and Credentials.
Note There can be only one connection per destination URL. -
Click Create and Continue.
For APIs that use client ID enforcement through MuleSoft, the connection configuration is created automatically, including external credentials, named credentials, external services, and permission sets.
For APIs using external or custom authentication protocols, API Catalog creates the named credential and sets the connection’s Authentication Status to Custom. After you complete the connection, verify your connection credentials and finish configuring them as needed. See Create or Edit an External Credential.
The first connection that you create is automatically set as the default connection. To use a different connection in your automations, set it as the default connection.
You can’t go back to update the connection immediately, but you can after you complete the activate action process. After you create the connection, you can update only the connection label and description. To use a different destination URL, create another connection for the API version using the new destination URL.
Make sure to assign user permissions for the connections that you create to avoid permission errors when you run the API actions.
Continue with activating actions for the API. See Activate Invocable Actions for APIs.
Create Multiple Connections for a MuleSoft API
If a MuleSoft API has multiple destination URLs (API instances), you can create multiple connections for the API. However, you can have only one active connection at a time for each destination URL.
- In Salesforce, from Setup, in the Quick Find box, enter API Catalog, and then select API Catalog.
- Select the API that you want to create a connection for.
- Click New Connection.
- Select the API version.
- To customize the default connection label and name, which default to the API name and version, overtype the label and name.
- Enter a description.
- Select a destination URL (API instance) to use as the managed named credential for this connection to Salesforce. If you can’t access a destination URL that you select, ask your Anypoint Platform admin to approve the access and check the status again. Select an SLA tier if needed. See MuleSoft Documentation: Client Applications, Contracts, and Credentials.
-
Click Done.
For APIs using client ID enforcement from MuleSoft, the connection configuration is created automatically, including external credentials, named credentials, external services, and permission sets.
For APIs using external or custom authentication protocols, API Catalog creates the named credential and sets the connection’s Authentication Status to Custom. After you complete the connection, verify your connection credentials and finish configuring them as needed. See Create or Edit an External Credential.
The first connection that you create is automatically set as the default. To use a different connection in your automations, set it as the default connection.
Set Default Connections for MuleSoft APIs
Set a connection as the default connection that's used by automations that run the associated MuleSoft API's actions. The first connection you create is automatically set as the default.
- Select the Connections tab for a version of a MuleSoft API.
- For a connection you want to set as the default, select the Set as Default action.
Create a Connection for an HTTP Callout
To create a connection to support an HTTP callout, create a connection without going through the activate action process.
- In Salesforce, from Setup, in the Quick Find box, enter API Catalog, and then select API Catalog.
- Select the API that you want to create a connection for.
- Click New Connection.
- Select the API version.
- To customize the default connection label and name, which default to the API name and version, overtype the label and name.
- Enter a description.
- Select a destination URL to use as the managed named credential for this connection to Salesforce. API Catalog lists only active destination URLs, which are managed in Anypoint API Manager.
-
Click Done.
Connection configuration is created automatically, including external credentials, named credentials, external services, and permission sets.
Assign User Permissions for the Connections
After you create the connection, give specific Salesforce users access to the activated actions so that they can use them in their Salesforce automations. You're prompted to assign permissions for API connections as part of the create connections process. If you skip that step, you can assign the permissions later. To avoid permission errors, assign permissions before you try to use the associated API actions.
- In Salesforce, from Setup, in the Quick Find box, enter API Catalog, and then select API Catalog.
- Select the API to set connection permissions for.
-
If Permission Status is Not Assigned for that API or you want to update the permission
assignment, click Assign.
The Permission Set page for the API opens.
- Manage and add assignments for users according to your organization's standards. For details, see Manage Permission Set Assignments.
Edit Connections
You can update the label or description for connections.
- In Salesforce, from Setup, in the Quick Find box, enter API Catalog, and then select API Catalog.
- Select the API version to modify.
- On the Connections tab, click Edit.
- Update the connection label or description.
To use a different destination URL, create another connection for the API version using the new destination URL.
Delete Connections
Delete unused, non-default connections.
- In Salesforce, from Setup, in the Quick Find box, enter API Catalog, and then select API Catalog.
- Select the API that has the connection to delete.
-
On the Connections tab, select a connection that's not set as
the default and click Delete.
To delete a connection that's set as the default, set a different connection as the default and then delete the non-default connection. See Create and Manage Connections for Your APIs.
