Download Volume File Endpoint
POST /v1/volumes/{volume_id}/files/download
Download one file from a volume. The content is returned base64-encoded in the JSON body.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
volume_id | path | string | Yes | ||
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"path": {
"type": "string",
"minLength": 1,
"title": "Path"
}
},
"type": "object",
"required": [
"path"
],
"title": "VolumeFileDownloadRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
path | string | Yes | minLength=1 |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"path": {
"type": "string",
"title": "Path"
},
"filename": {
"type": "string",
"title": "Filename"
},
"size": {
"type": "integer",
"title": "Size"
},
"content": {
"type": "string",
"title": "Content"
}
},
"type": "object",
"required": [
"path",
"filename",
"size",
"content"
],
"title": "VolumeFileDownloadResponse"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
path | string | Yes | ||
filename | string | Yes | ||
size | integer | Yes | ||
content | string | Yes |
400
Invalid path: empty, with path traversal, or outside the volume.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the volume belongs to another account.
No response body.
404
Volume not found; or file not found.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |
503
Persistent volumes are disabled, or volume storage is unavailable. Retry later.
No response body.