# Download a video studio task file for a job video

`POST /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/studio/task-files/{filename}`

API used by PeerTube runners.

Authentication: no security requirement declared for this operation.

Parameters:

- `jobUUID` (path, UUIDv4, uuid, required)
  Type: UUIDv4, uuid
  
  Schema: [UUIDv4](https://sourcey-peertube.pages.dev/api-rest-reference/models/uuidv4.md)
  
  minLength: 36
  
  maxLength: 36
  
  pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
  
  Example:
  
  ```json
  "9c9de5e8-0a1e-484a-b099-e80766180a6d"
  ```

- `videoIdOrUUID` (path, id | UUIDv4 | shortUUID, required) - Video id or UUID
  Type: id | UUIDv4 | shortUUID
  
  oneOf:
    Reference: [id](https://sourcey-peertube.pages.dev/api-rest-reference/models/id.md); Type: id
    
    minimum: 1
    
    Example:
    
    ```json
    42
    ```
  
    Reference: [UUIDv4](https://sourcey-peertube.pages.dev/api-rest-reference/models/uuidv4.md); Type: UUIDv4, uuid
    
    minLength: 36
    
    maxLength: 36
    
    pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    
    Example:
    
    ```json
    "9c9de5e8-0a1e-484a-b099-e80766180a6d"
    ```
  
    Reference: [shortUUID](https://sourcey-peertube.pages.dev/api-rest-reference/models/shortuuid.md); Type: shortUUID
    
    translation of a uuid v4 with a bigger alphabet to have a shorter uuid
    
    Example:
    
    ```json
    "2y84q2MQUMWPbiEcxNXMgC"
    ```

- `filename` (path, string, required) - Name of the task file to download
  Type: string

Request body: application/json (required)

Type: object

- `runnerToken` (required)
  Type: string

- `jobToken` (required)
  Type: string

Responses:

- 200: successful operation

Content type: application/octet-stream

Type: string, binary

- 400: the file is not associated with this edition task

- 403: the job is not associated with this video

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/runners/jobs/9c9de5e8-0a1e-484a-b099-e80766180a6d/files/videos/42/studio/task-files/string' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "runnerToken": "string",
  "jobToken": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "runnerToken": "string",
  "jobToken": "string"
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/runners/jobs/9c9de5e8-0a1e-484a-b099-e80766180a6d/files/videos/42/studio/task-files/string', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "runnerToken": "string",
  "jobToken": "string"
}'''

response = requests.post(
    'https://peertube2.cpy.re/api/v1/runners/jobs/9c9de5e8-0a1e-484a-b099-e80766180a6d/files/videos/42/studio/task-files/string',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
