Data Cloud Object-Specific APIs
If there's a REST endpoint available in the Data Cloud APIs for the Data Cloud data object you want to query, retrieve the data by using the object-specific APIs and sending a GET request for the REST resource. Object-specific API requests are less error-prone, more efficient and performant than writing a custom SQL query. Whenever an object-specific API is available, we recommend you use the API to retrieve data rather than crafting your own SQL queries.
With the object-specific APIs, you can retrieve these data items.
- Calculated insights
- Data graphs
- Unified individuals and accounts (Universal ID Lookup)
- Profiles
To call the REST endpoints, use one of these Data Cloud APIs.
- If your app integrates with the Salesforce Platform features and performs create, update, and delete operations on objects in addition to queries, we recommend you use the Data Cloud Connect REST API.
- Otherwise, use Data Cloud API. Data Cloud API provides similar capabilities as the Connect REST API but it’s optimized for use when making calls to the Data Cloud tenant and not for accessing Salesforce Platform features.
To compare these two APIs, see Custom App Development in the Data Cloud Developer Guide.
To view a video that walks you through the steps of calling Data Cloud Connect REST APIs with Postman, see Data Cloud Connect APIs and Postman Quick Start Video.
When making calls through the object-specific API, use the GET method for the REST resource that corresponds to the Data Cloud object. For example, to retrieve a DMO in the profile category, such as unified individual or unified account, through the Data Cloud Connect REST API, perform a GET request by using this endpoint.
For a unified individual, specify the data model name of UnifiedIndividual__dlm. Specify filters in a query string parameter. In this example, the filter is the ID of the unified individual record. Optionally, specify the fields to retrieve.
The query returns a result similar to this example.
See getProfileQueryDataModelObject in the Data Cloud Connect REST API Guide. The equivalent API in the Data Cloud API is GET /api/v1/profile/{dataModelName}. For more information, see Query Customer Profile Information with Profile API in the Data Cloud Reference Guide.