> ## Documentation Index
> Fetch the complete documentation index at: https://doc.extole.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Use the Extole Asynchronous Reporting API

> 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.

# 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](https://docs.extole.com/docs/generate-long-lived-access-tokens#generate-your-token).

## 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](/guides/dashboards-and-reporting/how-to-run-a-report)
* **\<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](https://my.extole.com/reports). 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](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734488/1fcb2ba95da9b801c56817b692b9/360083221214?expires=1778306400\&signature=ebf8bcedd56a91fd57d11e7bc923be6b93ce346c1d5a43bdaae4145b85bb34a8\&req=dSQlF859mYVXUfMW3nq%2BgZ7Nzs%2B4gGIB3lS7MyWqraZod5mHbJqtbIxoDJAA%0AHA8%2BzUZIDY%2FoLUinRt%2B%2FJpry94o%3D%0A)

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](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734491/60999a66861ee0fa24c4230008e2/360084392493?expires=1778306400\&signature=d4efd9f563e4ec035889ff43503f907e8040a9279a00fa6e21e3efbd41f84d5a\&req=dSQlF859mYVWWPMW3nq%2BgfTkfm6w2sDoT37tLeGuNZgb88pyXfPb6D2bRLU4%0AjFNSfFGGaZKjT8beKoL6wx3E7x0%3D%0A)![Screen\_Shot\_2020-08-07\_at\_8.24.32\_AM.png](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734490/3bb78e8661d9f2e963f3cbf575a2/360083220214?expires=1778306400\&signature=3c3fbc064cf8facba95d66e76497a9040c6672a91d5f1f33f564b4230342a688\&req=dSQlF859mYVWWfMW3nq%2BgZDkET4SU9FB69%2BwkGzWna1UzdTDiq76iZ7BCFj3%0AFV6kxI0MfahZR82hvhbT4i6epfU%3D%0A)

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](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734485/dbbe7f92a33bd99445e9a21eb66c/360083221254?expires=1778306400\&signature=a3e71836132cdd55ff1b5cffa99b62bd90ec0a69f85316d0cd04800a2763bead\&req=dSQlF859mYVXXPMW3nq%2BgV%2B%2BfdSxYsaov30hmPjrJ7VhF00RzZhBCJsYYA1o%0AggyFhY%2F4%2F4g%2F9APCm%2BnJ%2F40PEpk%3D%0A)![Screen\_Shot\_2020-08-07\_at\_8.34.28\_AM.png](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734513/a6c7562510ca3a457deaa3b20320/360083220774?expires=1778306400\&signature=a58cca498f6c405e9745813f58f30f21b05463fda7f23b274ead56c5022fb335\&req=dSQlF859mYReWvMW3nq%2BgQTDilMCpju%2F1pRedQcyNNkyQk4H%2BmVkd1A%2FuKTl%0AHgsnhjSSvpfbqx9femX80EP1nIw%3D%0A)

A successful output will look like this:

![Screen\_Shot\_2018-09-17\_at\_12.10.26\_PM.png](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734514/db56fd39b470260565dc42a3668a/360012794734?expires=1778306400\&signature=08a7ee84cab28bf22041f66ab6296167e6e09cdc40e7624cccfc767168dec3e8\&req=dSQlF859mYReXfMW3nq%2BgfwPtqSzpv7cz8x94Ef7K7BGDIBHhtCffV3H4PQC%0ATKSg63gOtLc62oWrd2JZQF%2FfPig%3D%0A)

## 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](https://extole-5ef307a0e5b1.intercom-attachments-7.com/i/o/syy27wia/1421734515/0b6c66b4a770f4880f6cd8483064/360025995914?expires=1778306400\&signature=815254ae2223edddeb405c71f190a6224ee4b57f87f467375e20283c8cb1f2a1\&req=dSQlF859mYReXPMW3nq%2BgYm3RUcbI44C0Vsyc8esc3fJYu1mJpzodfcvrkTL%0Alme3N2otTpNiOSh2%2FvASmwGH1Vc%3D%0A)

## 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
```
