Before you begin
- You have a Sift API key and your base URLs.
- You have the ID of the Run where you want to attach or remove a file.
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.
-
Look up the
remoteFileIdby callingListRemoteFileswith afilterscoped to the Run.The response’sremoteFilesarray includes each file’sremoteFileIdandfileName. -
Call
DeleteRemoteFilewith thatremoteFileId.
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:
- Remove the outdated file.
- Attach the new file to the same Run.