Create an upload batch from a path+size manifest. JSON body ceiling is 4 MiB on this route only (global public JSON stays 100kb). Exceeding it returns 413 PAYLOAD_TOO_LARGE. File bytes are not accepted here; clients upload objects directly to storage. With `sampleForFormatId` the batch carries a test sample for the draft of a team data format (FV-20c): it needs `algorithm:write`, `sourceType` `team-format` and files with an extension the draft card declares, and the sample is used only for that format's sample runs.
curl -X POST 'https://api.embodiflow.io/v1/upload-batches' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"dataSource": "string",
"dataFormat": "string",
"sourceKind": "human",
"recordingShape": "continuous",
"vendorSchema": "string",
"taskId": "string",
"task": "string",
"durationS": 0,
"sourceEpisodes": [
{
"taskId": "string",
"label": "string",
"id": "string",
"startS": 0,
"endS": 0
}
],
"captureSessions": [
{
"datasetKey": "string",
"captureSession": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"role": "mapping"
}
}
],
"captureLabels": {},
"sampleForFormatId": "00000000-0000-0000-0000-000000000000",
"projectId": "00000000-0000-0000-0000-000000000000",
"sourceType": "string",
"metadata": {},
"manifestFiles": [
{
"role": "calibration",
"deviceMeta": {},
"originalFilename": "string",
"relativePath": "string",
"contentType": "string",
"sizeBytes": 0,
"checksumExpected": "string"
}
],
"groupingOverrides": [
{
"captureSession": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"role": "mapping"
},
"targetDatasetKey": "string",
"targetDatasetName": "string",
"relativePaths": [
"string"
]
}
]
}'Authorization
Send a personal access token with every request.
- Authorization: Bearer PAT
Header parameters
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
Request body
- dataSourcestring | null
Optional recording source facet. Only ego_human is accepted when present. Omit for robot recordings. Literal ego_human (underscore); ego-human is rejected.
- dataFormatstring | null
- sourceKindstringAllowed valueshumanrobotumi
- recordingShapestringAllowed valuescontinuoussingle_taskpresegmented
- vendorSchemastring | null
- taskIdstring | null
- taskstring | null
Robot task text; wins over the project default (FV-09).
- durationSnumber | null
- sourceEpisodesarray<ImportSourceEpisodeBodyDto>
- taskIdstring | null
- labelstring | null
- idstringrequired
- startSnumberrequired
- endSnumberrequired
- captureSessionsarray<UploadFileGroupCaptureSessionBodyDto>
- datasetKeystringrequired
Plan file-group key this session applies to.
- captureSessionobjectrequired
- captureLabelsobject
Labels per planned recording, keyed by plan dataset key. Shape and size are checked by the service with RECORDING_CAPTURE_LABELS_* codes.
- sampleForFormatIdstring (uuid)
Upload a test sample for the draft of this team data format (FV-20c). The sample is only used for that draft's sample runs; it is never listed, counted, versioned or exported. Needs `algorithm:write` and sourceType `team-format`.
- projectIdstring (uuid)required
- sourceTypestringrequired
- metadataobject
- manifestFilesarray<CreateUploadSessionFileBodyDto>
- rolestring | nullAllowed valuescalibrationmappingmedia
- deviceMetaobject | null
- originalFilenamestringrequired
- relativePathstringrequired
- contentTypestring | null
- sizeBytesnumberrequired
- checksumExpectedstring | null
- groupingOverridesarray<UploadGroupingOverrideBodyDto>
- captureSessionobject
- targetDatasetKeystringrequired
- targetDatasetNamestringrequired
- relativePathsarray<string>required
Responses
Success
- dataobjectrequired
- batchobjectrequired
- datasetPlanobjectrequired
{
"data": {
"batch": {
"id": "string",
"tenantId": "string",
"projectId": "string",
"datasetId": "string",
"sourceType": "string",
"status": "string",
"createdAt": "string",
"updatedAt": "string",
"lastActivityAt": "string",
"totalSessions": 0,
"completedSessions": 0,
"failedSessions": 0,
"datasetCount": 0,
"latestDatasetPlanStatus": "string",
"materializationStatus": "string",
"latestRun": {
"id": "string",
"status": "string"
},
"failure": {
"code": "string",
"reason": "string",
"stepId": "string",
"stepName": "string",
"stepAlgorithm": {
"slug": "string",
"title": "string",
"official": false
},
"stepRunId": "string",
"runId": "string",
"stepErrorCode": "string"
},
"processingRefused": {
"code": "string"
}
},
"datasetPlan": {
"status": "ready",
"projectType": "string",
"sourceType": "string",
"fileCount": 0,
"totalBytes": 0,
"datasets": [
{
"key": "string",
"name": "string",
"sourceType": "string",
"fileCount": 0,
"totalBytes": 0,
"files": [
{}
],
"groupingMode": "directory",
"rootPath": "string",
"captureSession": {
"id": "string",
"name": "string",
"role": "other"
}
}
],
"issues": [
{
"code": "string",
"severity": "warning",
"message": "string",
"relativePaths": [
"string"
]
}
],
"ignoredFiles": [
"string"
]
}
}
}