Update a draft
PUT
/v1/datasets/{datasetId}/annotations/draftcurl -X PUT 'https://api.embodiflow.io/v1/datasets/{datasetId}/annotations/draft' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"datasetVersionId": "00000000-0000-0000-0000-000000000000",
"timeRangeAnnotations": [
{
"datasetVersionId": "00000000-0000-0000-0000-000000000000",
"annotationSchemaId": "00000000-0000-0000-0000-000000000000",
"segmentKind": "action",
"startSec": 0,
"startNsec": 0,
"endSec": 0,
"endNsec": 0,
"timeReference": "string",
"title": "string",
"naturalLanguageInstruction": "string",
"success": true,
"score": 0,
"failureReason": "string",
"parentId": "00000000-0000-0000-0000-000000000000",
"orderIndex": 0,
"reviewStatus": "string",
"status": "string",
"attributesJson": {}
}
],
"frameSpatialAnnotations": [
{
"datasetVersionId": "00000000-0000-0000-0000-000000000000",
"datasetVersionFileId": "00000000-0000-0000-0000-000000000000",
"frameIndex": 0,
"frameStampSec": 0,
"frameStampNsec": 0,
"timeReference": "string",
"datasetClassId": "00000000-0000-0000-0000-000000000000",
"className": "string",
"trackId": "string",
"trackKey": "string",
"bboxX": 0,
"bboxY": 0,
"bboxWidth": 0,
"bboxHeight": 0,
"occluded": true,
"truncated": true,
"reviewStatus": "string",
"status": "string",
"attributesJson": {}
}
]
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
路径参数
- datasetIdstring必填
请求体
Content-Typeapplication/json
- datasetVersionIdstring (uuid) | null
ADR 0172 D6 optional version scope; additive, omission keeps legacy behavior.
- timeRangeAnnotationsarray<CreateDatasetTimeRangeAnnotationBodyDto>必填
- datasetVersionIdstring (uuid) | null
- annotationSchemaIdstring (uuid) | null
- segmentKindstring可选值actionsegmenteventphasequality-issuetasksubtaskskill
- startSecnumber必填
- startNsecnumber
- endSecnumber必填
- endNsecnumber
- timeReferencestring必填
- titlestring | null
- naturalLanguageInstructionstring | null
- successboolean | null
- scorenumber | null
- failureReasonstring | null
- parentIdstring (uuid) | null
- orderIndexnumber
- reviewStatusstring
- statusstring
- attributesJsonobject | null
- frameSpatialAnnotationsarray<CreateDatasetFrameSpatialAnnotationBodyDto>必填
- datasetVersionIdstring (uuid) | null
- datasetVersionFileIdstring (uuid)必填
- frameIndexnumber必填
- frameStampSecnumber | null
- frameStampNsecnumber | null
- timeReferencestring必填
- datasetClassIdstring (uuid) | null
- classNamestring | null
- trackIdstring | null
- trackKeystring | null
- bboxXnumber必填
- bboxYnumber必填
- bboxWidthnumber必填
- bboxHeightnumber必填
- occludedboolean | null
- truncatedboolean | null
- reviewStatusstring
- statusstring
- attributesJsonobject | null
响应
Success
- dataobject必填
- timeRangeAnnotationsarray<DatasetTimeRangeAnnotationDto>必填
- frameSpatialAnnotationsarray<DatasetFrameSpatialAnnotationDto>必填
响应示例
{
"data": {
"timeRangeAnnotations": [
{
"id": "string",
"tenantId": "string",
"projectId": "string",
"datasetId": "string",
"datasetVersionId": "string",
"annotationSchemaId": "string",
"segmentKind": "string",
"startSec": 0,
"startNsec": 0,
"endSec": 0,
"endNsec": 0,
"timeReference": "string",
"title": "string",
"naturalLanguageInstruction": "string",
"success": false,
"score": 0,
"failureReason": "string",
"parentId": "string",
"orderIndex": 0,
"reviewStatus": "string",
"status": "string",
"publishedSnapshotId": "string",
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": "string",
"attributesJson": {}
}
],
"frameSpatialAnnotations": [
{
"id": "string",
"tenantId": "string",
"projectId": "string",
"datasetId": "string",
"datasetVersionId": "string",
"datasetVersionFileId": "string",
"frameIndex": 0,
"frameStampSec": 0,
"frameStampNsec": 0,
"timeReference": "string",
"datasetClassId": "string",
"className": "string",
"trackId": "string",
"trackKey": "string",
"bboxX": 0,
"bboxY": 0,
"bboxWidth": 0,
"bboxHeight": 0,
"occluded": false,
"truncated": false,
"reviewStatus": "string",
"status": "string",
"publishedSnapshotId": "string",
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": "string",
"attributesJson": {}
}
]
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1