メインコンテンツまでスキップ

Collection の名前変更 (V2)

この操作は、既存の collection の名前を変更し。

POST/v2/vectordb/collections/rename
接続エンドポイント

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

  • ${CLUSTER_ENDPOINT} を、あなたのZilliz Cloudクラスターのエンドポイントに置き換える必要があります。
  • エンドポイントを取得するには、Describe Cluster V2 APIを使用してレスポンスから値を抽出してください。
shell
export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
パラメータ
Authorizationstringheader必要

認証トークンは、適切な権限を持つ API key または username:password のようにコロンで連結した username と password の組み合わせである必要があります。project endpoint を使用している場合は、十分な権限を持つ有効な API key のみ使用できます。

値の例: Bearer {{TOKEN}}
リクエスト・ボディ
dbNamestring

collection が属する database の名前です。存在しない database を指定するとエラーになります。指定しない場合は、default database が適用されます。

collectionNamestring必要

対象の collection の名前です。 存在しない collection を指定するとエラーになります。

newDbNamestring

この操作後に collection が属する database の名前です。 値のデフォルトは default です。この操作前に collection が属していたものとは異なる database に設定すると、この collection は指定した database に移動されます。 存在しない database を指定するとエラーになります。

newCollectionNamestring必要

この操作後の対象 collection の名前です。 これを元の名前に設定するとエラーになります。

bash
export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "test_collection",
"newCollectionName": "quick_setup"
}'
レスポンス

なし

codeinteger

レスポンスコード。

dataobject

エラーメッセージを返します。

codeinteger

レスポンスコード。

messagestring

エラーメッセージ。

Successjson
{
"code": 0,
"data": {}
}