Downloads
Getting bytes back out: a signed URL for one file, a stream for the kinds a browser shows inline, and a job for a whole selection at once.
Start a download job
For selections too large to stream in one response: packs them in the background and returns a job to poll.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Start a download job › Request Body
file_idssizeStart a download job › Responses
Success
Get a download job
Reports where a download job has got to. Poll it until the status is completed, at which point the response carries the URL to fetch.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a download job › Responses
Success
job_idstatusfile_countdownload_urlPresent once the status is completed.
Cancel a download job
Stops a download job that has not finished. A job already completed is left alone.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Cancel a download job › Responses
Success
job_idstatusGet a download URL
A signed, expiring URL for the file's bytes.
Requires any one of media:download, document:download, knowledge-base:view, thread:view, design:view, prompt:view or presentation:view.
path Parameters
idquery Parameters
sizeHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a download URL › Responses
Success
A signed URL, valid for a short window. The bytes never pass through the API.
Stream font bytes
Streams the font's bytes. Fonts come through the API rather than a signed URL so a browser can load them with FontFace without a cross-origin round trip.
Requires any one of media:download, document:download, knowledge-base:view, thread:view, design:view, prompt:view or presentation:view.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Stream font bytes › Responses
Success
Stream image bytes
Streams the image through the API rather than redirecting — for callers that cannot follow a signed URL, such as a canvas that would otherwise be tainted by a cross-origin fetch. Ask for a thumbnail or large rendition instead of the original where one exists.
Requires any one of media:download, document:download, knowledge-base:view, thread:view, design:view, prompt:view or presentation:view.
path Parameters
idquery Parameters
replicaHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Stream image bytes › Responses
Success
Get a version URL
Returns a signed URL for one earlier version of a file. It expires shortly; fetch a new one rather than storing it.
Requires any one of media:download, document:download, knowledge-base:view, thread:view, design:view, prompt:view or presentation:view.
path Parameters
idversion_idquery Parameters
sizeHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a version URL › Responses
Success
A signed URL for that version, valid for a short window.
Download files as a ZIP
Zips a selection and returns it. Large selections should go through POST /download-jobs instead, which does the same work in the background.
Requires any one of media:download, document:download, knowledge-base:view, thread:view, design:view, prompt:view or presentation:view.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Download files as a ZIP › Responses
Success
