Data Cloud SQL Query APIs
If there’s no object-specific API for the object that you want to retrieve, or if your query is complex and there’s no ready-made client library for your language available, use the Query REST API call and provide a custom SQL query.
Here are links to the documentation for the Query v2 API calls.
- Data Cloud Connect REST API Query Calls: queryDataV2 and queryBatchData in the Data Cloud Connect REST API Guide
- Data Cloud API Query Calls: Query Data using Query API V2 in the Data Cloud Reference Guide
- Connect API in Apex Query Call: Apex methods in the CdpQuery Class in the Apex Reference 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.
For example, to query Individual records, send a POST request to this endpoint.
And include this SQL query in the request body.
This output shows a sample response from the REST query call.
To learn about query API limits, see Customer Data Platform Limits and Guidelines in Salesforce Help.
For an overview of the SQL syntax and SQL query examples, see Query Data from Data Cloud Using SQL.