Skip to main content
After completing this workflow, you can attach a file to a Run, remove a file from a Run, and replace an outdated file with a new version, all using the API.

Before you begin

How Run file attachments work

Attaching a file to a Run uploads it and creates a remote file entry. Removing a file deletes that entry. To put a new version of a file on a Run, remove the existing version and attach the new one.

Attach a file to a Run

POST /api/v0/remote-files/upload uploads a file and creates its remote file entry in a single request. This endpoint is not currently listed in the REST API reference. Call it with the file and the Run’s ID.

Remove a file from a Run

DeleteRemoteFile requires the file’s remoteFileId.
  1. Look up the remoteFileId by calling ListRemoteFiles with a filter scoped to the Run.
    The response’s remoteFiles array includes each file’s remoteFileId and fileName.
  2. Call DeleteRemoteFile with that remoteFileId.

Update a Run file attachment

UpdateRemoteFile only updates a file’s description and metadataValues, not its contents. To put a new version of a file on a Run:
  1. Remove the outdated file.
  2. Attach the new file to the same Run.

Verify