CoolaData provides a query API that can be used  to query your project at any time. This enable you to create your own dashboards or easily integrate data from CoolaData with other tools.

Queries can be sent using GET or POST methods.

 

End Point

Replace the [project_id] placeholder with your actual Project ID.

 

Header

Replace the [User_API_Token] placeholder with your actual user API Token found in the user profile side-bar.

ContentType: application/x-www-form-urlencoded: Only relevant for method:post. This parameter can also be omitted if the content is already URL encoded. Other content types are not supported.

Optional Headers:

The default format for time-stamp properties returned in the query API is: yyyy-mm-dd hh:mm:ss. Add this header (without content) to the query to get time-stamp properties in the format in which they were sent. For example, event_time_ts will be returned in Epoch time in milliseconds.

Data/Payload

Replace the [query] placeholder with your actual query. The query should be written in CoolaSQL (CQL).

Optional Parameters:

Add to the query to force the system to ignore cache. All query results are cached for 30 minutes to provide fast response time. After 30 minutes it will be refreshed, regardless of how many queries were made during this time. Using noCache will only make a difference if the same query was first performed in the last 30 minutes, and data has been altered since. This isn’t mandatory in the API.

The default output of the query API is JSON. Add this to the query to get an output in the form of CSV instead.

 

Sample Invocations

The following queries includes both optional parameters for reference purpose – neither is mandatory.

Method: GET

The query should be URL encoded.

Method: POST

 

Response

The default output of the query API is JSON, in the following format:

Note: The query API result set is limited to 5M rows.

Sample Response:

Print Friendly, PDF & Email