# download

## Overview

This endpoint is used to download the output file(s) associated with a completed export. Calling download on an incomplete or failed exports will return an error.

## HTTP Request

```http
GET /exports/:exportId/download?filePart=:int
```

{% hint style="success" %}
This endpoint supports [HTTP Range requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Range_requests), allowing you to resume interrupted downloads.
{% endhint %}

## Path parameters

<table><thead><tr><th width="302.5">Parameter</th><th></th></tr></thead><tbody><tr><td>exportId</td><td>The unique identifier of the export, returned in the response to <a href="post">export.post</a>.</td></tr></tbody></table>

## Query parameters

<table><thead><tr><th width="302.5">Parameter</th><th></th></tr></thead><tbody><tr><td>filePart</td><td>The zero-indexed file number for exports that contain multiple files.<br><br>The number of files in the export is known based on the <code>fileCount</code> property returned by <a href="get">export.get</a>. To for example, if <code>export.fileCount == 2</code> , you would make separate requests to download each file, with <code>?filePart=0</code> and <code>?filePart=1</code></td></tr></tbody></table>

{% hint style="info" %}
This endpoint extends the [general API structure](https://docs.redivis.com/api/rest-api/general-structure)
{% endhint %}

## Authorization

Data access to all tables referenced by the query is required. If a table's data is not public, your access token must have one of the following scopes:

* data.data
* data.edit

[Learn more about authorization.](https://docs.redivis.com/api/rest-api/authorization)

## Response body

The response body will contain the contents of the exported file.
