Skip to content
Get started

Labric Upload File Api

post/api/v1/tools/upload-file

Upload a job artifact file.

Intended for use by jobs running in sandboxes. Accepts a multipart/form-data file upload, stores it in GCS, and returns the created file record. When a job_execution_id is provided, records provenance linking the file to that execution.

ReturnsExpand Collapse
file_id: string

The ID of the uploaded file.

file_name: string

The original file name.

size_kilobytes: number

File size in kilobytes.

Labric Upload File Api
curl https://platform.labric.co//api/v1/tools/upload-file \
    -H 'Content-Type: multipart/form-data' \
    -H "Authorization: Bearer $LABRIC_API_KEY" \
    -F file=undefined
{
  "file_id": "file_id",
  "file_name": "file_name",
  "size_kilobytes": 0
}
Returns Examples
{
  "file_id": "file_id",
  "file_name": "file_name",
  "size_kilobytes": 0
}