# get

## HTTP Request

```http
GET /api/v1/rawFiles/:fileId
```

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

## Path parameters

| Parameter | Type   | Description                                  |
| --------- | ------ | -------------------------------------------- |
| :fileId   | string | The globally unique identifier for this file |

## Query parameters

| Parameter |        |                                                                                  |
| --------- | ------ | -------------------------------------------------------------------------------- |
| workflow  | string | Optional. The id of the associated workflow where this file is being referenced. |
| table     | string | Optional. The id of the associated table where this file is being referenced.    |
| version   | string | Optional. The tag of the associated version where this file is being referenced. |

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

## Authorization

You must have data access to the file's associated dataset, and your access token must have the following scope:

* data.data

[Learn more about authorization.](/api/rest-api/authorization.md)

## Request headers

This endpoint accepts [HTTP Range Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests) to allow for partial downloads. For example, send `Range: bytes=0-1023` to get the first 1024 bytes.

## Request body

The request body must be empty.

## Response headers

In addition to standard response headers, this API provides the additional information associated with the file:

<table><thead><tr><th width="184">Name</th><th>Description</th></tr></thead><tbody><tr><td>Content-Disposition</td><td>HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition">content disposition</a>, including information about the file's name.</td></tr><tr><td>Content-Length</td><td>The size, in bytes, of the response. Note if using Range Requests, this will be the size of the current response, not the entire file.</td></tr><tr><td>Content-Range</td><td><p>Will only be returned if a <code>Range</code> was set on the request headers. Takes the form </p><pre><code>bytes startByte-endByte/total
</code></pre></td></tr><tr><td>Content-Type</td><td>The file's <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME type</a>, derived from the file extension. If the MIME type is unknown, will be set to <code>application/octet-stream</code>.</td></tr></tbody></table>

## Response body

Returns the file content. If a range request was made, will return the content for the specified byte range.

## Examples

{% tabs %}
{% tab title="curl" %}

```bash
curl -H "Authorization: Bearer $REDIVIS_ACCESS_TOKEN" \
"https://redivis.com/api/v1/rawFiles/93qh-6wdzwrz84.bc574P4o8ypzp8yKCnrgIw"
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/rest-api/files/get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
