> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.datafortennis.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.datafortennis.com/_mcp/server.

# Download a bounded range of a private canonical artifact

GET https://api.datafortennis.com/v1/exports/{exportId}/files/{fileId}

Single bytes range with inclusive offsets or suffix. Up to 16MiB by explicit credential budget; existing keys retain 128KiB. If-Match checks a strong SHA256 ETag. Multi-range is rejected. No public signed URLs.

Reference: https://docs.datafortennis.com/api-reference/download-export

## Authentication

- `Authorization` header (bearer token, required) — Private development credential: keyId.secret; rotate/revoke through the offline operations CLI.

## Request

### Path parameters

- `exportId` (string, required)
- `fileId` (string, required)

### Headers

- `Range` (string, optional)
- `If-Match` (string, optional)

## Response

### 200

Canonical immutable file bytes. Each range checks current access; retries count delivery attempts, never another generation.

- `string`

### 206

Canonical immutable file bytes. Each range checks current access; retries count delivery attempts, never another generation.

- `string`

## Errors

### 400 Bad Request Error

Invalid input

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 401 Unauthorized Error

Invalid credential

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 403 Forbidden Error

Scope denied

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 404 Not Found Error

Unknown resource

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 409 Conflict Error

Idempotency key conflicts with its bound request

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 410 Gone Error

Cursor or idempotency replay window expired

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 412 Precondition Failed Error

Strong ETag precondition failed

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 413 Content Too Large Error

Response budget exceeded

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 414 URI Too Long Error

URI too long

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 416 Range Not Satisfiable Error

Unsatisfiable range

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 429 Too Many Requests Error

Request budget exceeded

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

### 503 Service Unavailable Error

Temporarily unavailable

- `data` (ErrorData, required, nullable)
- `meta` (ErrorMeta, required, nullable)
- `page` (ErrorPage, required, nullable)
- `error` (ErrorError, required)

## Types

### ErrorData

### ErrorMeta

### ErrorPage

### ErrorError

- `code` (string, required)
- `message` (string, required)
- `request_id` (string, required)

## Examples

### Example 1

**Response**

```json
"string"
```

**SDK Code**

```python
import requests

url = "https://api.datafortennis.com/v1/exports/exportId/files/fileId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.datafortennis.com/v1/exports/exportId/files/fileId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.datafortennis.com/v1/exports/exportId/files/fileId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.datafortennis.com/v1/exports/exportId/files/fileId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.datafortennis.com/v1/exports/exportId/files/fileId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.datafortennis.com/v1/exports/exportId/files/fileId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.datafortennis.com/v1/exports/exportId/files/fileId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.datafortennis.com/v1/exports/exportId/files/fileId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Response**

```json
"string"
```

**SDK Code**

```python
import requests

url = "https://api.datafortennis.com/v1/exports/exportId/files/fileId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.datafortennis.com/v1/exports/exportId/files/fileId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.datafortennis.com/v1/exports/exportId/files/fileId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.datafortennis.com/v1/exports/exportId/files/fileId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.datafortennis.com/v1/exports/exportId/files/fileId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.datafortennis.com/v1/exports/exportId/files/fileId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.datafortennis.com/v1/exports/exportId/files/fileId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.datafortennis.com/v1/exports/exportId/files/fileId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```