The Clarisights API query explorer is built to mirror the GUI of the platform itself for building queries. Users who have API access can visit this link to check out the explorer after logging in to the platform. Alternately, users who do not have access to the platform, yet need access to the API can also visit the same link and input the company's API token to access the explorer.

You'll first see this on opening the explorer - 

The first option, "Endpoint" is used to select the API endpoint you want to explore. More information on the endpoints can be found in their respective help articles - accounts, dimensions, metrics, stats, levels, segments, realtime_metrics, and jobs.

Once you've chosen an endpoint, you'll need to select the "Data Sources". These can be picked from the dropdown list, which shows the channels you have access to. Please note that analytics channels are not shown in this list, as they are automatically joined to the chosen ad channel data.

You can also see your access token to the API. As mentioned above, you can share this token with team members who do not have access to the platform, and developers for building out an integration. Please ensure that the access token is kept confidential as it grants access to your data.

Below this, you'll see the query builder on the left and the query response viewer on the right.

The query builder has a the following selectors. Please note that these are available only for the v1/stats and v1/jobs endpoints. The v1/accounts, v1/metrics, v1/dimensions, v1/levels, v1/segments and v1/realtime_metric endpoints are GET requests. 

For v1/stats

  1. Dimensions - This shows the list of dimensions available to pick.
  2. Metrics - This shows the list of metrics available - both in the chosen ad channels and the corresponding analytics channels.
  3. Filter - The filter currently supports the following conditions:
    a) Dimensions - "starts with", "contains" and "does not contain".
    b) Metrics - "equals", "not equals", "greater than" and "less than".
    You can build combinations of both metric and dimension filters.
  4. Sort - This allows you to pick the dimensions/metrics to sort by. You can sort by multiple columns, in which case the sorting will happen sequentially from the first chosen column.
  5. Date Range - You can pick the date range to request data for, in this. You can also choose from pre-set templates like 'This Week', 'Last Week', 'Last 28 Days' etc.

For v1/jobs

  1. Level - This shows the levels at which you can breakdown the data.
  2. Segment - This shows the different breakdown segments that are available.
  3. Metrics - This shows the list of metrics available. Note that analytics metrics are not available here, since joining is not supported in realtime jobs.
  4. Filter - The filter currently supports the following conditions:
    a) Dimensions - "starts with", "contains" and "does not contain".
    b) Metrics - "equals", "not equals", "greater than" and "less than".
    You can build combinations of both metric and dimension filters.
  5. Date Range - You can pick the date range to request data for, in this. You can also choose from pre-set templates like 'This Week', 'Last Week', 'Last 28 Days' etc.

You will notice that as you modify the options in these selectors, the query below changes dynamically to reflect those edits. You can also build a query, copy the generated request and store it internally for later use in the API itself. Upon clicking "Run Query", you'll be able to see the response in JSON format.

The v1/accounts, v1/metrics, v1/dimensions, v1/levels, v1/segments and v1/realtime_metrics endpoints have the query builder and data source selector disabled, since these are GET requests. You just need to select the desired endpoint and click "Run Query" to see the response.

Did this answer your question?