刷新外部 Collection (V2)
This operation triggers an asynchronous data refresh job for an existing external collection, re-syncing the collection's data from its underlying external source. externalSource and externalSpec must be both provided or both omitted; when both are omitted, the collection's previously persisted source and spec are reused.
该 API 的 Base URL 格式如下:
https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530
- 如果您使用的是服务集群,请使用集群端点。
Free 与 Serverless 版
https://{cluster-id}.serverless.{region}.vectordb.zillizcloud.comDedicated 版
https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
认证令牌,应为具备适当权限的 API 密钥或用冒号分隔的用户名和密码,如 username:password。如果您使用的是项目端点,则仅具备足够权限的有效 API 密钥适用。
数据库名称。
待刷新 Collection 的名称。
外部数据源的 JSON 配置。提供该字段时必须同时提供 externalSpec;省略时将复用 Collection 此前已持久化的 source 配置。Zilliz Cloud Volume 中的对象 URL 适用。
此参数仅适用于 Iceberg 表。
描述外部数据与 Collection 字段映射关系的 JSON 配置。提供该字段时必须同时提供 externalSource;省略时将复用 Collection 此前已持久化的 spec 配置。
此参数仅适用于 Iceberg 表。
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/jobs/external_collection/refresh" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"dbName": "default",
"collectionName": "ext_books"
}'
响应码。
响应负载,包含新建刷新任务的 ID。
新建刷新任务的 ID。请使用该值通过 describe 接口查询任务进度。
返回错误消息。
响应码。
错误描述。
{
"code": 0,
"data": {
"jobId": 449503829274509300
}
}