latestOpenAPI 3.1.02026-08-145132109.4 KB

e4dda8c7f007

Tasks

Get signed URL for direct-to-cloud upload to a task

Get a signed URL for direct-to-cloud upload using ActiveStorage - step 1 of uploading files to a task. Upload the file bytes to the returned URL, then attach the blob to a task by passing its signed_id to add_files_to_task. Requires the files_write scope.

post/projects/{project_id}/tasks/direct_upload

Path parameters

project_idinteger required

ID of the project

Request body

Example request

{
  "blob": {
    "filename": "document.pdf",
    "content_type": "application/pdf",
    "byte_size": 123456,
    "checksum": "nYXrj5mT5pP2nL0C4D5N0w=="
  }
}

Response

Signed URL for direct-to-cloud upload

signed_idstring required

Signed blob ID to pass to add_files_to_task after uploading the file bytes.

Example response

{
  "signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJsb2Igc2lnbmVkIn19...",
  "direct_upload": {
    "url": "https://my-bucket.s3.amazonaws.com/rails/active_storage/blobs/...",
    "headers": {
      "Content-Type": "application/pdf",
      "Content-MD5": "nYXrj5mT5pP2nL0C4D5N0w=="
    }
  }
}