Download a file you own
Returns the bytes, NOT a JSON envelope. Files in object storage answer 302 with a presigned URL valid for one hour; locally stored files are streamed directly.
The redirect target is a credential. Anyone holding that presigned URL can read the object until it expires. Do not log it, cache it in a shared cache, or pass it on.
Authorization here is two-layer, and files:read is only the outer one. The route gate checks files:read; the handler then checks that your token can read the file's own container. A token holding files:read but not images:read gets 404 for an image - a 404 rather than a 403, so a denial cannot be told apart from a nonexistent file.
Contrast GET /api/files/download/{uuid}, which is also documented here: it is owner-checked but has NO scope check at all.
Request
- Base URL: https://contentmaschine.ai/api
- URL: https://contentmaschine.ai/api/v1/files/{uuid}/download
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://contentmaschine.ai/api/oauth/authorize, token URL https://contentmaschine.ai/api/oauth/token)
Path parameters
The file uuid of an item in your library (from the gallery or library list, or a finished job).
Response
The file bytes (locally stored files).
Changes
No recorded changes to this operation across all 1 revision of this API.