Query Data using Query API V1

The Query API V1 supports SQL query in ANSI standard. The SQL can be a free form SQL with objects that include data streams, profile/engagement data model objects, and unified data model objects. The Query API V1 supports only synchronous calls. You can use the API to support a variety of use cases that include data extraction, external application integration or interactive querying on the data lake. If you don't want to fetch the entire data like in case of browser based clients then you can make a call to the API with limit and offset.

A newer version of the Query API is available. We recommend using Query V2 API to take advantage of GET calls in addition to POST calls, subsequent requests, and larger response sizes.

Note

Key Properties

  • The call return limit defaults to the max limit of 49,999 rows returned. Use a done flag to check whether more records exist.
  • There is no explicit limit to the SQL call length.
  • There is no explicit limit for the number of nested sub queries.
  • There is no explicit limit for the number of joins.
  • There is no explicit limit for the number of filters.
  • There is no explicit limit for the number of column projections.
  • There is no explicit limit for any specific data type, such as VARCHAR, DECIMAL, or TIMESTAMP.
  • Pagination supported via limit, offset, and orderby parameters.
    • When done is flagged as true in the response, then there are no more records to query. When the response is false, call orderby with offset param to retrieve the next set of numbers.

Connected App Setup

We recommend referring to User Roles and Permission Sets in Customer Data Platform before setting up the Connected App. Your orgs should be provisioned with Customer Data Platform licenses and the users must be assigned to appropriate roles for having full access to objects in the Customer Data Platform.

Important

Set Up a Connected App to discover new insights about your customers.

Acquire and Exchange Your Access Token for Customer Data Platform

Refer to Getting Started page to acquire the CDP token.

Call Reference