Create the Data Federation API Named Credential

Create a named credential for the Data Federation API. You can use the Data Federation API in APEX callouts to create custom components that can retrieve data across clouds or orgs.

User Permissions Needed
To view named credentials: View Setup and Configuration
To create, edit, or delete named credentials: Customize Applications
To add the named credential URL DfsDataSourceProvider

You must add the Data Federation Service as an external data source for the Data Federation Service API named credential to work as expected.

Important

These are the steps necessary to create a named credential for the Data Federation Service (DFS).

  1. From Setup, enter Named Credentials in the Quick Find box, then select Named Credentials.
  2. Click New Named Credential, or click Edit to modify an existing named credential.
  3. Complete the fields.
    Field Description
    Label Salesforce recommends you include “DF” in the name. Only one DF named credential is needed for any custom components you create.
    Name DataFederationServiceAPI
    URL

    callout:sfdc:DataFederationServiceAPI

    The Data Federation Service API named credential does not use http or https as part of the URL, because it uses Cloud to Cloud authentication.

    Note

    If you get a validation error, make sure the DfsDataSourceProvider perm is enabled.

    Tip

    Certificate No certificate is required.
    Identity Type Named Principal: Cloud to Cloud
  4. Make sure these options are enabled.
    Field Description
    Generate Authorization Header

    Make sure this option is enabled.

    Allow Merge Fields in HTTP Header

    Make sure this option is enabled.

    Allow Merge Fields in HTTP Body

    Make sure this option is enabled.