跳到主要内容

列出外部 Collection 刷新任务 (V2)

This operation lists external-collection refresh jobs. When collectionName is omitted or empty, returns refresh jobs across all external collections in the target database.

POST/v2/vectordb/jobs/external_collection/list
连接端点

该 API 的 Base URL 格式如下:

https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530

📘说明
  • 如果您使用的是服务集群,请使用集群端点。
    • Free 与 Serverless 版

      https://{cluster-id}.serverless.{region}.vectordb.zillizcloud.com

    • Dedicated 版

      https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530

控制面接口速率限制为单用户单接口每秒最多 20 个请求。

export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
参数
Authorizationstringheaderrequired

认证令牌,应为具备适当权限的 API 密钥或用冒号分隔的用户名和密码,如 username:password。如果您使用的是项目端点,则仅具备足够权限的有效 API 密钥适用。

示例值:Bearer {{TOKEN}}
请求体application/json
dbNamestring

用于列出刷新任务的数据库名称。

collectionNamestring

外部 Collection 名称。留空或省略时,将返回数据库下所有外部 Collection 的刷新任务。

export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/jobs/external_collection/list" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"dbName": "default",
"collectionName": "ext_books"
}'
响应200 - application/json
codeinteger

响应码。

示例值:0
dataobject

响应负载,包含刷新任务列表。

recordsarray

刷新任务详情列表。

[]recordsobject

单个刷新任务的详细信息。

jobIdinteger<int64>

刷新任务的 ID。

collectionNamestring

该刷新任务关联的外部 Collection 名称。

statestring

刷新任务的当前状态。

progressinteger

刷新进度百分比(0-100)。

externalSourcestring

本任务所使用的外部数据源 JSON 配置。Zilliz Cloud Volume 中的对象 URL 适用。

startTimeinteger<int64>

刷新任务的开始时间(Unix 时间戳)。

endTimeinteger<int64>

刷新任务的结束时间(Unix 时间戳);任务仍在进行中时为 0

reasonstring

失败原因。仅当 stateRefreshFailed 时返回。

返回错误消息。

codeinteger

响应码。

messagestring

错误描述。

{
"code": 0,
"data": {
"records": [
{
"jobId": 449503829274509300,
"collectionName": "ext_books",
"state": "RefreshCompleted",
"progress": 100,
"externalSource": "{\"type\":\"volume\",\"path\":\"volume://my-volume/books\"}",
"startTime": 1712832000000,
"endTime": 1712832600000
},
{
"jobId": 449503829274509300,
"collectionName": "ext_movies",
"state": "RefreshInProgress",
"progress": 42,
"externalSource": "{\"type\":\"volume\",\"path\":\"volume://my-volume/movies\"}",
"startTime": 1712833000000,
"endTime": 0
}
]
}
}