List artifacts
GET /api/workspace/tree returns every file, flattened to one list:
truncated flag marks a
clipped result.
Read one artifact
GET /api/workspace/file/{file} returns one artifact with its metadata.
Encode each path segment: /api/workspace/file/recon%2FINDEX.md.
Text artifacts carry their decoded content. Binary artifacts return
metadata only, and the bytes come from the raw endpoint. Reads past 512 KiB
come back clipped, with truncated: true.
Download an artifact
GET /api/workspace/raw/{file} streams the raw bytes with the derived
content type. Use it for downloads and image previews. Scriptable documents
(HTML, SVG, XML) download as attachments, so a stored artifact never
executes in the dashboard origin.
Delete artifacts
DELETE /api/workspace/artifacts deletes artifacts:
- Send
{ "paths": ["recon/INDEX.md"] }to delete exactly those files, up to 500. - Send an empty body to clear the whole workspace.
Export the workspace
An export packs selected artifacts, or the whole workspace, into one ZIP. The export runs in the background, so you can keep working after you start it. Start an export by sending the paths in batches of five:- The first batch (
batchIndex: 0) creates the export. The response returns itsid. - Send each later batch with that
idin theexportIdfield. - Every response answers
202with the batch progress. The last batch queues the build. - To export everything, send every path from
GET /api/workspace/tree, in batches of five.
downloads/{your-user-id}.zip. When the
archive is ready, the platform sends you a dashboard notification with the
download link. The toast, the notification bell, and the profile’s Download
History all carry it.
The download lives for one day:
GET /api/workspace/exports/{id}/downloadstreams the ZIP. The endpoint answers409while the export is not ready, and410after the link expires.GET /api/workspace/exportslists your exports with their created and expiry times.GET /api/workspace/exports/{id}returns one entry. Poll it while the export runs.

