Getting Report Data API
#
Reports APIThis is useful especially if you need to pass live data to your other applications. For example, you may want to feed a live CSV endpoint of your user segmentation list into your email marketing application so that you can always get fresh data upon retrieving them.
#
API KeyPlease see guide to setup your API key.
#
Submit Report QueryTo submit a report query job, you will need to use the following HTTP endpoint:
If successful, this endpoint will return the job ID of the job created. To get the result, you will need to poll for the job status with
Do note that the results are paginated, look into the paginated
section of the response JSON for more information. To fetch the next page of data, append &_page=<page_number>
to the URL.
Params:
_page_size
: (optional) set the page size of the response_page
: (optional) set the page number of data to fetch
#
Submit Report Export JobIn order to download the CSV or Excel for a report's result set, you will need to use the following:
- Supported
format
: csv/json/xlsx
Or if your query string is too long (> 500 letters), you can consider using a POST request:
In the request body, specify the filter values in JSON format:
- Supported
format
: csv/json
If successful, the endpoint will return the job ID for the export job created. To get the result, you will need to poll for the job status with either of these endpoints:
Once the job status is 'success', you can download the result file via exports/download
endpoint
#
Small dataset (< 10K rows)For a small dataset (less than 10 thoudsands rows), you can use just this endpoint to download the data:
#
How often does these API data refresh?This is based on your report cache duration that you set in the report.