GET /api/v1/cloud/files/{file_id}
Retrieves a single File object. Files in deleted status are not returned by this endpoint.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | File ID with the file_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
id | string | File ID with the file_ prefix |
type | string | Always "file" |
filename | string | Stored file name |
size_bytes | integer | File size in bytes |
mime_type | string | MIME type supplied by the upload or detected from the file name |
downloadable | boolean | Whether this file can be downloaded through the /content endpoint |
scope | object | null | Scope object when the file is associated with another resource, for example { "id": "sess_...", "type": "session" } |
metadata | object | Custom metadata object supplied on upload; defaults to {} |
created_at | string | UTC creation time in RFC 3339 format |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | authentication_error | Missing or invalid authentication token |
| 404 | not_found_error | File with the given ID does not exist or is in deleted status |
Related
Attach and download files
Upload files to give your agent context, and download files it produces.