Create a download session
POST
/v1/download-sessionscurl -X POST 'https://api.embodiflow.io/v1/download-sessions' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"exportJobId": "00000000-0000-0000-0000-000000000000",
"artifactId": "00000000-0000-0000-0000-000000000000",
"datasetVersionId": "00000000-0000-0000-0000-000000000000",
"deliveryMode": "aws-cli",
"expiresInSeconds": 0
}'认证
每个请求都需要携带个人访问令牌(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.
请求体
Content-Typeapplication/json
- exportJobIdstring (uuid)
- artifactIdstring (uuid)
- datasetVersionIdstring (uuid)
- deliveryModestring可选值aws-climchttps-manifest
- expiresInSecondsnumber
响应
Success
- dataobject必填
- sessionobject必填
- sessionTokenstring必填
- providerAccessPayloadobject | null必填
- credentialobject
- fallbackReasonstring | null
响应示例
{
"data": {
"session": {
"id": "string",
"tenantId": "string",
"scopeType": "string",
"scopeId": "string",
"datasetVersionId": "string",
"artifactId": "string",
"storageBucketId": "string",
"manifestObjectId": "string",
"objectPrefix": "string",
"accessMode": "string",
"deliveryMode": "string",
"status": "string",
"expiresAt": "string",
"lastUsedAt": "string",
"createdAt": "string",
"updatedAt": "string"
},
"sessionToken": "string",
"providerAccessPayload": {},
"credential": {
"accessKeyId": "string",
"secretAccessKey": "string",
"sessionToken": "string",
"expiresAt": "string",
"bucketName": "string",
"region": "string",
"provider": "string",
"endpoint": "string",
"prefixes": [
"string"
],
"objectKeys": [
"string"
]
},
"fallbackReason": "string"
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1