Query API


Almost all data shown within the Calq reporting interface can be queried remotely using the Query API and AQL. The API is queried using simple HTTP(s) requests in the following format:

aql Required The AQL query that specifies the data to fetch.
read_key Required The read key for the project being queried.
format Optional An optional formatter for the query result (see below). If not specified the default is json.

For example:



Calq has a range of formatters available depending on the type of query used. Different types of query support different formatters. If no format parameter is specified then the default format of json is used.

The default json formatter renders time series data in a format suitable for D3.js.

Formatter Time series Funnel (Conversion) Funnel (Users) Retention People
json Y Y N Y Y
json_chartjs Y N N N N
csv Y Y Y N N

Issuing a query with an incompatible formatter will result in an error being returned.