跳到主要内容

迁移数据至现有集群

Migrate data from a cluster to another.

POST
/v2/migrations/toExisting
Base URL

该 API 的 Base URL 格式如下:

https://api.cloud.zilliz.com.cn

export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheaderrequired

认证令牌,应为具备适当权限的 API 密钥。

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

The source cluster information.

clusterIdstring必填项

The ID of the source cluster.

示例值:inxx-xxxxxxxxxxxxxxxxx
destinationobjectrequired

The destination cluster information.

clusterIdstring必填项

The ID of the destination cluster.

示例值:inxx-xxxxxxxxxxxxxxxxxx
dbCollectionsarray

The collections that need to be migrated.

[]dbCollectionsobject

Collection information.

dbNamestring

The name of the source database. This is optional. If left unspecified, the default database applies.

destDbNamestring

The name of the destination database.

collectionsarray

The names of the collections that need to be migrated in the above specified source database. If this is left unspecified, all collections in the source database will be migrated.

[]collectionsobject

A list of collection names.

collectionNamestring

A collection name.

export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/migrations/toExisting" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"source": {
"clusterId": "inxx-xxxxxxxxxxxxxxx"
},
"destination": {
"clusterId": "inxx-xxxxxxxxxxxxxxx"
},
"dbCollections": [
{
"collections": [
{
"collectionName": "medium_articles"
}
]
}
]
}'
响应200 - application/json
codeinteger

响应码。

dataobject
jobIdstring

The ID of the job that has been created upon your request.

Returns an error message.

codeinteger

响应码。

messagestring

错误描述。

{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}