Page options
Files through the Biocompile API
Last updated
On this page
A file in Biocompile is a record of the project like a hypothesis: it has an identifier
(fil_…), and every contribution that changes it publishes a new revision (fil_ab12.3) that
never changes. With files:read a token reads published files and the files in your
workbenches. With files:write it uploads, renames, moves, replaces and deletes files as
drafts in a workbench, which reach the project when you contribute them.
Paths start with /api/v1/organizations/{organization_id}.
Read a published file
GET .../files/{ref} returns a file’s details: its name, folder, media type, description,
tags and revision. GET .../files/{ref}/content returns its bytes. Add ?revision=N to read an
older revision:
curl -s "https://app.biocompile.com/api/v1/organizations/$ORG_ID/files/fil_cd34/content?revision=2" \
-H "Authorization: Bearer $ACCESS_TOKEN" -o plate_reader.csv
Work with files in a workbench
GET .../workbenches/{workbench_id}/files shows the workbench as one tree: its drafts over the
bound project’s published files, each with a state (published, draft_new, draft_edit
or draft_delete).
| Operation | What it does |
|---|---|
POST .../workbenches/{workbench_id}/files | Uploads a file as a new draft with its own identifier |
PATCH .../workbenches/{workbench_id}/files/{ref} | Renames, moves, describes or tags a file, as a draft |
PUT .../workbenches/{workbench_id}/files/{ref}/content | Replaces a file’s content, as a draft |
DELETE .../workbenches/{workbench_id}/files/{ref} | Discards a new file’s draft, or drafts the deletion of a published file |
GET .../workbenches/{workbench_id}/files/{ref}/content | The bytes as the workbench sees them |
curl -s --request POST "https://app.biocompile.com/api/v1/organizations/$ORG_ID/workbenches/$WORKBENCH_ID/files" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-F "file=@plate_reader_OD600_2026-03.csv" -F "path=/raw" -F "description=March plate reader"
One upload is one request of at most 512 MiB. Nothing changes for anyone else until you contribute the drafts. A deleted file leaves the project then, and its published revisions stay citable.
Who may change what
- A workbench is yours: other people get
404for it. - You read the published files of projects you can open.
- A file a Run or a paper contains is never changed in place: changing it makes a copy.
Common questions
Where did the folder and resumable upload operations go?
Files are records of the research project now, so they are changed as drafts in a workbench.
Folders are a file’s path, and an upload is one request.
Can a service account upload files?
Yes, into its own workbenches. A person contributes them to the project.
Related
Was this page helpful?
Something wrong or missing?