Dispatch one durable Modal upload publication
POST
/v1/datasets/upload/publication
const url = 'https://example.com/v1/datasets/upload/publication';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"operation_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","repo_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","source_format":"lerobot_v2_1","expected":{"generation":1,"git_hash_algorithm":"sha1","git_oid":"example","commit_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pack_digest":"example"},"uploads":[{"staging_id":"example","blob_id":"example","content_length":1}],"manifests":[{"file_format":"generic","terms":[{"blob_id":"example","offset_in_blob":1,"length":1}],"expected_raw_blake3":"example","expected_raw_sha256":"","path":"example","mode":33188}],"existing_entries":[{"manifest_id":"example","path":"example","mode":33188}]}'};
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/v1/datasets/upload/publication \ --header 'Content-Type: application/json' \ --data '{ "operation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "repo_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "source_format": "lerobot_v2_1", "expected": { "generation": 1, "git_hash_algorithm": "sha1", "git_oid": "example", "commit_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pack_digest": "example" }, "uploads": [ { "staging_id": "example", "blob_id": "example", "content_length": 1 } ], "manifests": [ { "file_format": "generic", "terms": [ { "blob_id": "example", "offset_in_blob": 1, "length": 1 } ], "expected_raw_blake3": "example", "expected_raw_sha256": "", "path": "example", "mode": 33188 } ], "existing_entries": [ { "manifest_id": "example", "path": "example", "mode": 33188 } ] }'Persist one complete tree and return immediately after worker dispatch.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” x-api-key
string | null
Request Body required
Section titled “Request Body required ” Media type application/json
BeginUploadPublicationBody
object
operation_id
required
string format: uuid
repo_id
required
string format: uuid
name
required
string
source_format
required
string
expected
object
generation
required
integer
git_hash_algorithm
required
string
git_oid
required
string
commit_id
required
string format: uuid
pack_digest
required
string
uploads
required
Array<object>
StagedUploadBodyobject
staging_id
required
string
blob_id
required
string
content_length
required
integer
manifests
required
Array<object>
UploadVerificationManifestBodyobject
file_format
string
terms
required
Array<object>
ManifestTermBodyOne contiguous run of chunks inside one blob, named as a byte range.
The blob seal proves offset_in_blob is a dense prefix sum of length over
the directory ordinal, so a range of ordinals is exactly one range of bytes
and the two spellings carry the same fact.
object
blob_id
required
string
offset_in_blob
required
integer
length
required
integer
expected_raw_blake3
required
string
expected_raw_sha256
string
path
required
string
mode
required
integer
existing_entries
required
Array<object>
ExistingUploadPublicationEntryBodyobject
manifest_id
required
string
path
required
string
mode
required
integer
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationErrorobject
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": {} } ]}