Data Federation API FAQ

Learn the answers to frequently asked questions about the Data Federation API.

What Is the Data Federation API (DF API)?

The Data Federation API is an OData REST API that enables clients to execute federated queries against queryable data models. The DF API reduces the complexity of retrieving data across clouds and orgs, as one query can return data from all of your data sources. Data Federation API queries are written against the Cloud Information Model (CIM) that all data sources are mapped to.

What Do I Use the Data Federation API For?

Use the DF API to build reports and components with easy access to data across multiple data sources in a single federated query.

What Do I Need to Do to Make a Data Federation API Query?

Create the DFS named credential and call it using an Apex callout. Consult your Customer 360 Admin to make sure they have completed the other tasks required for the integration experience you want to enable. These include connecting data sources and mapping entities. See the examples for more information.

How Do I Validate That the Mapped Schema Supports My Query Parameters?

Use the Metadata resource to retrieve the data model for the data source you want to query. The resource returns all available entities and attributes that are available to query. Basic query operations are documented in the Query resource. Any OData syntax not documented is not supported.

How Do I Filter on Query Parameters and What Are the Limitations on Query Filters?

Basic OData 4.0 filters are supported for any data source. Some data sources might allow nested or more $expand query filters.

What Information Does Data Federation API Retrieve?

It returns 25 records from the full data set, in undetermined order. If you have many results, Salesforce recommends querying on global profile ID, as it significantly filters and improves the quality of results.

Do I Have to Use the Global Party ID in My Query?

When you want to query across relationships, both entities in the relationship need a global profile ID. If you are directly querying an entity, then a global profile ID is not required for a query to be successful.

How Do I Control How the Query Results Are Returned and Paginate Through Them?

You can use the query parameters to sort or limit results. Since DF API returns a maximum of 25 records, pagination features are not needed.

How Do I Query Across Objects?

If you use the Global Party ID (GPID) as a filter parameter, DF API queries account, contact, and lead objects mapped to the Individual entity.