Start the import: creates the upload batch, pinned to the previewed commit (`sha`), and queues the download Job.
curl -X POST 'https://api.embodiflow.io/v1/projects/{projectId}/hf-imports' \
-H "Authorization: Bearer $EMBODIFLOW_PAT" \
-H 'Content-Type: application/json' \
-d '{
"repoId": "string",
"revision": "string",
"accessToken": "string",
"sha": "string",
"force": true,
"task": "string"
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
路径参数
- projectIdstring必填
请求头参数
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte; a 5xx is not stored, so the same key runs the request again. 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.
请求体
- repoIdstring必填
`owner/name`, optionally `owner/name@revision` or a dataset URL.
- revisionstring | null
Branch, tag or commit; default `main`.
- accessTokenstring | null
Read token for a private or gated dataset. Write-only: used for this request (preview) or handed once to the import Job, never stored.
- shastring | null
The commit the preview showed; a moved revision is refused.
- forceboolean
Import again although this commit is already in the project.
- taskstring | null
Task text for episodes without their own; default the project's.
响应
Success
- dataobject必填
- batchobject必填
- previewobject必填
{
"data": {
"batch": {
"id": "string",
"tenantId": "string",
"projectId": "string",
"recordingId": "string",
"sourceType": "string",
"status": "string",
"name": "string",
"createdAt": "string",
"updatedAt": "string",
"lastActivityAt": "string",
"idle": false,
"canDiscard": false,
"totalSessions": 0,
"completedSessions": 0,
"failedSessions": 0,
"recordingCount": 0,
"latestRecordingPlanStatus": "string",
"materializationStatus": "string",
"latestRun": {
"id": "string",
"status": "string",
"recordingTally": {
"total": 0,
"usable": 0,
"gateRejected": 0,
"failed": 0,
"skipped": 0,
"tested": 0,
"unfinished": 0
}
},
"runningStepId": "string",
"recordingsWaitingForImage": 0,
"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"
},
"submitRefusal": {
"code": "string",
"message": "string"
},
"processedAt": "string",
"processingOutcome": "succeeded",
"failedRecordingCount": 0,
"withoutProcessing": false,
"source": {
"hub": "huggingface",
"repoId": "string",
"requestedRevision": "string",
"sha": "string",
"license": "string"
},
"importProgress": {
"state": "queued",
"filesDone": 0,
"filesTotal": 0,
"bytesDone": 0,
"bytesTotal": 0,
"updatedAt": "string"
}
},
"preview": {
"repoId": "string",
"requestedRevision": "string",
"sha": "string",
"license": "string",
"name": "string",
"codebaseVersion": "string",
"robotType": "string",
"fps": 0,
"totalEpisodes": 0,
"cameras": [
"string"
],
"fileCount": 0,
"totalBytes": 0,
"maxBytes": 0,
"warnings": [
{
"code": "string",
"robotType": "string",
"missing": [
"string"
]
}
],
"tokenRequired": false
}
}
}