Overview
Extole provides asynchronous API endpoints to download various reports. To run, check the status of, and download a report, you need to make calls across three API endpoints.
Setup
Generate an access token
Get your access token. To generate a long-lived access token, follow the documentation here: Generating Long-Lived Access Tokens.
Execute a report
POST https://api.extole.io/v4/reports
With these HTTP Headers:
Authorization: <ACCESS_TOKEN>
Content-Type: application/json
With this Body:
{
"name":"<REPORT_NAME>",
"format":"<FORMAT>",
"parameters":{
"date_range":"<DATE_RANGE.START>/<DATE_RANGE.END>" }
}
Options for parameters above:
<REPORT_NAME>: Name of report you want to download. Available reports are listed here: How to Run Data Reports
<FORMAT>: JSON, CSV
<DATE_RANGE.START>: Any start date for the report range. Takes format YYYY-MM-DD
<DATE_RANGE.END>: Any end date for the report range. Takes format YYYY-MM-DD
Note: Different reports require different parameters. To find out exactly how your API call should look, first run the report in My Extole. Then, you can click the three dots from the reports listing page and select "GET API Call":
Alternatively, you can click into the report itself and click the "Get API Call" button.
For scheduled reports, the "Get API Call" button on the schedules page will give you the latest version of the scheduled report:
A successful output will look like this:
Check the Status of a Report
There are four options for the status of the report.
Pending: The report is preparing to run.
In progress: The report is initialized and in progress. Depending on the amount of data you pull back, reports typically remain in this status for one to ten minutes.
Failed: There was an error in the API call.
Done: The report is complete and ready to be downloaded.
From the output above, copy and paste the report ID. Remove the quotes.
GET https://api.extole.io/v4/reports/<REPORT_ID>
A successful output will look like this:
Download the Report
Once the status reads "DONE" you will be able to download your report.
GET https://api.extole.io/v4/reports/<REPORT_ID>/download