Skip to main content
The API reaches RevDrive, the same files and folders you see in the web app: your own Drive and the shared drives you belong to. You can browse and read them, upload new files, save run outputs to Drive, and use Drive files as run inputs.

Drives and ids

There are two kinds of drive:
  • Your Drive is personal. It holds your own files and folders, plus what others have shared with you and the folders of projects you are in.
  • Shared drives belong to a team. What you can do in one depends on your role in it.
Ids say which kind of drive an item is in: Every item has permission, your access to it, and canEdit, whether you can rename, move or add to it:
  • Your Drive: owner, admin, editor, commenter or viewer, from a share, a folder above it or a project. Owners, admins and editors can change things.
  • Shared drives: your role. Managers and contributors can add and change files; commenters and viewers can only read.
Items in the trash are never listed or returned.

Browse

GET /v1/drive/items lists the root of your Drive. Folders come first, then files, each by name.
Narrow the list with these query parameters: GET /v1/drive/shared-drives lists the shared drives you are a member of, with your role.

Read a file

GET /v1/drive/files/{driveFileId} returns a file’s metadata. GET /v1/drive/files/{driveFileId}/content returns a pre-signed download URL, valid for 15 minutes, and for text files the start of the content inline:
  • Text files include CSV, TSV, SDF, PDB, XYZ and FASTA. Other files have content: null; download them from url.
  • content holds whole lines, up to maxBytes (256 KB by default, up to 1 MB).
  • For CSV and TSV, rows caps the data rows after the header (200 by default, up to 10,000).
  • truncated says the file goes on; download the rest from url.

Use a Drive file as a run input

Pass a Drive file id where a run takes a file id, the same way as an upload’s file_… id:
  • Any file you can read works: dfile_… from your Drive or shared with you, or sdfile_… from a shared drive.
  • The key needs data:read as well as runs:write.
  • The engine’s input formats and size limits apply as for uploads. GET /v1/engines/{engine} lists them.
  • The run gets its own copy of the file when it starts. Changing, moving or trashing the Drive file afterwards doesn’t change the run.

Upload a file

Uploading into Drive takes three requests: reserve the file, PUT the bytes, then complete it.
  • The first response has the file’s id, its final name and the upload to make. Send the PUT before upload.expiresAt.
  • Complete checks the bytes are in place and the size matches. Until the PUT has finished it answers 409 CONFLICT. Calling it again returns the file.
  • Leave out folderId for the root. For a shared drive, give an sdfld_… folder or a driveId.
  • If a file with that name is already there, it is renamed name (1), name (2) and so on. Send "onConflict": "error" to get 409 CONFLICT instead.

Save an upload or a run output to Drive

POST /v1/drive/import copies an upload or a run’s output into Drive as a new file, so it shows in the web app:
name renames the copy, and onConflict works as for uploads. The copy is independent of the original.

Organize

  • Create a folder: POST /v1/drive/folders with a name, and a parentId or driveId. Names must be unique in their folder; a duplicate answers 409 CONFLICT.
  • Rename or move: PATCH /v1/drive/items/{itemId} with a new name, a parentId to move it into (null for the root), or both. You need edit access to the item and the destination. Items move only within the same drive: not between your Drive and a shared drive. Items linked to a project stay in that project.
  • Trash: DELETE /v1/drive/items/{itemId} moves a file or folder, with everything in it, to the trash. Restore it from the web app’s Trash. In your Drive it needs edit access. In a shared drive, managers can trash anything and contributors only files they added.
There is no permanent delete in the API.

Limits

Not in this version

  • Sharing Drive items, and managing shared-drive members.
  • Restoring from the trash, and deleting permanently. Use the web app.
  • Moving items between your Drive and a shared drive.
  • Format conversions (RevScan) and editing (RevEdit).

Scopes

MCP tools

create_run accepts Drive file ids in inputs. For example: “Dock the ligands in screening/round3.sdf into my KRAS structure with RevScreen, then save the top hits to the same folder.” See the tools reference for each tool’s arguments.