Request Presigned Reupload
POST
/datasets/{dataset_id}/reupload/presigned
const url = 'https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reupload/presigned';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"filename":"example","file_size":1,"content_type":"application/octet-stream"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reupload/presigned \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filename": "example", "file_size": 1, "content_type": "application/octet-stream" }'Request presigned URL(s) for direct-to-S3 reupload.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” dataset_id
required
Dataset Id
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
PresignedUploadRequest
object
filename
required
Filename
Original filename being uploaded. Used to determine the file extension and content disposition.
string
file_size
required
File Size
Total file size in bytes. Used to decide between single-part and multipart upload.
integer
content_type
Content Type
MIME type to associate with the uploaded object.
string
Responses
Section titled “ Responses ”Successful Response
Media type application/json
PresignedUploadResponse
object
job_id
required
Job Id
Identifier of the ingestion job created for this upload.
string format: uuid
urls
required
Urls
One presigned PUT URL per part. Single-element list for single-part uploads.
Array<string>
s3_key
required
S3 Key
Object key in the S3 bucket where the file will be stored.
string
Example generated
{ "job_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "urls": [ "example" ], "s3_key": "example", "upload_id": "example", "part_size": 1}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}