Begin a dataset upload
POST
/v1/datasets/upload/begin
const url = 'https://example.com/v1/datasets/upload/begin';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"example","merge_target":"example","merge_intent_action_needed":"example","source_format":"example","upload_protocol":1,"ingest_toml":"example","rig":"example"}'};
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/begin \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "example", "merge_target": "example", "merge_intent_action_needed": "example", "source_format": "example", "upload_protocol": 1, "ingest_toml": "example", "rig": "example" }'Get-or-create the customer’s repo for name (under their own org) and
return its handle PLUS its current file tree (prior versions) in one
round-trip — the SDK uses the tree for the warm/edit fast paths. Idempotent.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
UploadBeginBody
object
name
required
string
merge_target
string | null
merge_intent_action_needed
string | null
source_format
string | null
upload_protocol
integer
ingest_toml
string | null
rig
string | null
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleInvalid or missing API key
Media type application/json
ErrorResponse
Standard error response.
object
detail
required
Error message describing what went wrong
string
Example generated
{ "detail": "example"}Validation 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": {} } ]}