Create a upload session
POST
/v1/upload-sessionscurl -X POST 'https://api.embodiflow.io/v1/upload-sessions' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"uploadBatchId": "00000000-0000-0000-0000-000000000000",
"storageBucketId": "00000000-0000-0000-0000-000000000000",
"files": [
{
"role": "calibration",
"deviceMeta": {},
"originalFilename": "string",
"relativePath": "string",
"contentType": "string",
"sizeBytes": 0,
"checksumExpected": "string"
}
]
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
请求头参数
- x-embodiflow-clientstring
Optional CLI hint (`cli`). Write STS is issued only to PAT principals; cookie sessions keep putUrl / part-urls even if this header is sent.
- 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.
请求体
Content-Typeapplication/json
- uploadBatchIdstring (uuid)必填
- storageBucketIdstring (uuid) | null
- filesarray<CreateUploadSessionFileBodyDto>必填
- rolestring | null可选值calibrationmappingmedia
- deviceMetaobject | null
- originalFilenamestring必填
- relativePathstring必填
- contentTypestring | null
- sizeBytesnumber必填
- checksumExpectedstring | null
响应
Success
- dataobject必填
- sessionsarray<UploadSessionSummarySwaggerDto>必填
响应示例
{
"data": {
"sessions": [
{
"id": "00000000-0000-0000-0000-000000000000",
"uploadBatchId": "00000000-0000-0000-0000-000000000000",
"storageBucketId": "00000000-0000-0000-0000-000000000000",
"objectKey": "string",
"originalFilename": "string",
"uploadMode": "single",
"status": "string",
"expiresAt": "2026-01-01T00:00:00Z",
"putUrl": "string",
"providerUploadId": "string",
"writeCredentials": {
"accessKeyId": "string",
"secretAccessKey": "string",
"sessionToken": "string",
"expiresAt": "2026-01-01T00:00:00Z",
"bucketName": "string",
"region": "string",
"provider": "string",
"endpoint": "string",
"objectKey": "string",
"prefix": "string",
"forcePathStyle": true
},
"partSizeBytes": 0
}
]
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1