Skip to main content

How to Use the Extole Asynchronous Reporting API

Updated over 2 months ago

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":

Screen_Shot_2020-08-07_at_8.25.27_AM.png

Alternatively, you can click into the report itself and click the "Get API Call" button.

Screen_Shot_2020-08-07_at_8.21.02_AM.png
Screen_Shot_2020-08-07_at_8.24.32_AM.png

For scheduled reports, the "Get API Call" button on the schedules page will give you the latest version of the scheduled report:

Screen_Shot_2020-08-07_at_8.33.09_AM.png
Screen_Shot_2020-08-07_at_8.34.28_AM.png

A successful output will look like this:

Screen_Shot_2018-09-17_at_12.10.26_PM.png

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:

Screen_Shot_2019-02-14_at_1.39.17_PM.png

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
Did this answer your question?