File Transfers
Reserve task upload
Reserve task upload
POST
/v2/tasks/{resource_id}/files/uploadsReserve an idempotent task upload bound to size and SHA-256 digest. Shared/... paths and shared-folder scopes return 503 with detail.code=shared_transfer_not_available. Use their standard upload route, which retains its 25 MiB limit.
Path Parameters
resource_idstring · uuidrequiredRequest Body
request_idstring · uuidrequiredpathstringrequiredsize_bytesintegerrequiredcontent_sha256stringrequiredcontent_typestringoptionalcurl --request POST \
--url https://api.brainbaselabs.com/v2/tasks/{resource_id}/files/uploads \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
"path": "string",
"size_bytes": 1073741824,
"content_sha256": "string",
"content_type": "application/octet-stream"
}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"direction": "upload",
"path": "string",
"size_bytes": 0,
"status": "pending_upload",
"bytes_transferred": 0,
"stored": false,
"error_code": "string",
"error": "string",
"entry": {
"name": "string",
"path": "string",
"is_dir": true,
"size": 0,
"mod_time": "string",
"mode": "string",
"permissions": "string",
"owner": "string",
"group": "string"
},
"upload": {
"bucket": "string",
"object_key": "string",
"endpoint": "string",
"signature": "string",
"expires_at": "2019-08-24T14:15:22Z"
},
"download_url": "string"
}