Upload a file

View as Markdown
Upload a file. Accepts a multipart/form-data file upload, stores it in GCS, and returns the created file record. At least one of job_execution_id and instrument_id is required: pass a job_execution_id for an artifact of a job running in a sandbox, which also records provenance linking the file to that execution, and pass an instrument_id for data captured off-platform by an instrument the Sync app cannot reach, which attaches the file to that instrument so instrument triggers and parsers pick it up. Requires an API key with the `write` scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects a multipart form containing a file.
filefileRequired
job_execution_idstring or nullOptionalformat: "uuid"
instrument_idstring or nullOptionalformat: "uuid"

Response

OK
file_idstring
The ID of the uploaded file.
file_namestring
The original file name.
size_kilobytesinteger or null
File size in kilobytes.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error