Skip to content

Verify and publish staged R2 uploads

POST
/v1/datasets/upload/finalize-batch
curl --request POST \
--url https://example.com/v1/datasets/upload/finalize-batch \
--header 'Content-Type: application/json' \
--data '{ "uploads": [ { "staging_id": "example", "blob_id": "example", "content_length": 1 } ] }'

Promote verified staging objects before a manifest may reference them.

Scope is derived exclusively from the authenticated account. A client can present an opaque staging handle, but cannot finalize another tenant’s staging namespace or choose a publication scope.

x-api-key
string | null
Media type application/json
FinalizeUploadBatchBody
object
uploads
required
Array<object>
>= 1 items <= 128 items
StagedUploadBody
object
staging_id
required
string
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
blob_id
required
string
/^[0-9a-f]{64}$/
content_length
required
integer
>= 1 <= 33554432
Example generated
{
"uploads": [
{
"staging_id": "example",
"blob_id": "example",
"content_length": 1
}
]
}

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationError
object
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}