Authenticate and obtain a Data Cloud-scoped access token; the Data Cloud Query API is accessed via Connect REST endpoints on the Salesforce org at /services/data/vXX.0/ssot/query.
Submit a synchronous query using POST /services/data/v62.0/ssot/query with body {"sql": "SELECT ... FROM <DMO_ApiName> WHERE ..."}; small result sets are returned immediately in the response.
For larger result sets or async execution, use POST /services/data/v62.0/ssot/query-sql (Query Connect API) and receive a queryId in the response; poll GET /services/data/v62.0/ssot/query-sql/<queryId> for status.
Retrieve rows from a completed async query via GET /services/data/v62.0/ssot/query-sql/<queryId>/rows; follow the nextPageUrl in the response to paginate through all result pages.
Cancel a running query if needed with DELETE /services/data/v62.0/ssot/query-sql/<queryId>.
Reference DMO API names exactly as defined in Data Cloud Setup; use the /api/v1/metadata/ endpoint to enumerate available objects and their field names.
Known gotchas
Data Cloud SQL supports a subset of ANSI SQL — joins across DMO categories (Profile, Engagement, Other) are permitted but must reference the unified individual's ssot__Id__c correctly.
Query results reflect the latest resolved state of the lakehouse; they are not real-time and may lag ingestion by the identity resolution processing window.
The synchronous /ssot/query endpoint has a shorter timeout than the async /ssot/query-sql path; use async for anything that might scan large DMOs.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp