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"
]
}
]
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
请求头参数
- 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.
请求体
- 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
- sourceKindstring可选值humanrobotumi
- recordingShapestring可选值continuoussingle_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
- idstring必填
- startSnumber必填
- endSnumber必填
- captureSessionsarray<UploadFileGroupCaptureSessionBodyDto>
- datasetKeystring必填
Plan file-group key this session applies to.
- captureSessionobject必填
- 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)必填
- sourceTypestring必填
- metadataobject
- manifestFilesarray<CreateUploadSessionFileBodyDto>
- rolestring | null可选值calibrationmappingmedia
- deviceMetaobject | null
- originalFilenamestring必填
- relativePathstring必填
- contentTypestring | null
- sizeBytesnumber必填
- checksumExpectedstring | null
- groupingOverridesarray<UploadGroupingOverrideBodyDto>
- captureSessionobject
- targetDatasetKeystring必填
- targetDatasetNamestring必填
- relativePathsarray<string>必填
响应
Success
- dataobject必填
- batchobject必填
- datasetPlanobject必填
{
"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"
]
}
}
}