获取导入任务进度 (V2)
本接口可获取指定导入任务的进度信息。
POST/v2/vectordb/jobs/import/describe
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
Authorizationstringheader必填项
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
请求体application/json
请求需提供 jobId;它可以与 clusterId 组合,与 projectId 和 regionId 同时组合,或单独提供。
jobIdstring必填项
指定导入任务 ID。
clusterIdstring必填项
指定集群 ID。
请求需提供 jobId;它可以与 clusterId 组合,与 projectId 和 regionId 同时组合,或单独提供。
jobIdstring必填项
指定导入任务 ID。
projectIdstring必填项
指定项目 ID。
regionIdstring必填项
指定地域 ID。
bash
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/vectordb/jobs/import/describe" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"jobId": "job-xxxxxxxxxxxxxxxxxxxxx",
"clusterId": "inxx-xxxxxxxxxxxxxxx"
}'
bash
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/vectordb/jobs/import/describe" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"jobId": "job-xxxxxxxxxxxxxxxxxxxxx",
"projectId": "proj-xxxxxxxxxxxxxxx",
"regionId": "ali-cn-hangzhou"
}'
bash
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/vectordb/jobs/import/describe" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"jobId": "job-xxxxxxxxxxxxxxxxxxxxx",
"projectId": "proj-xxxxxxxxxxxxxxx",
"regionId": "ali-cn-hangzhou"
}'
响应200 OK - application/json
成功
包含导入任务描述的响应对象。
codeinteger
响应码。
示例值:0
dataobject
响应负载,为包含指定导入任务进度信息在内的详细信息。
collectionNamestring
当前导入任务的目标 Collection 名称。
completeTimestring
当前导入任务完成时间。
detailsarray
按数据文件维度分别收集的数据导入统计信息。
[]detailsobject
从某个数据文件中导入数据的统计信息。
completeTimestring
当前数据文件完成处理时间。
fileNamestring
数据文件名称。
fileSizestring
数据文件大小。
progressstring
进度百分比。
statestring
数据文件处理状态。
reasonstring
导入失败原因。如果导入成功,该字段为空。
importedRowsstring
从当前文件导入的行数。
totalRowsstring
从当前文件导入数据完成后,目标 Collection 中的总行数。
fileSizeinteger
已上传文件大小(字节)。
jobIdinteger
批量导入任务 ID。
createTimestring
当前导入任务的创建时间。
progressinteger
当前导入任务的进度百分比。
statestring
当前导入任务的状态。
reasonstring
当前导入任务失败的原因。任务成功时为空字符串。
importedRowsinteger
当前任务完成导入完成后,向目标 Collection 中插入的行数。
totalRowsinteger
当前导入任务完成后,目标 Collection 中的总行数。
返回错误消息。
codeinteger
响应码。
messagestring
错误描述。
Successjson
{
"code": 0,
"data": {
"jobId": "448761313698322011",
"collectionName": "medium_articles",
"fileName": "medium_articles_2020_dpr.json",
"fileSize": 3279917,
"state": "Completed",
"progress": 100,
"completeTime": "2024-04-01T06:17:55Z",
"reason": "",
"totalRows": 100000,
"details": [
{
"fileName": "medium_articles_2020_dpr.json",
"fileSize": 3279917,
"state": "Completed",
"progress": 100,
"completeTime": "2024-04-01T06:17:53Z",
"reason": ""
}
]
}
}