Truncate コレクション (V2)
This operation removes all data from the specified collection while keeping the collection schema.
POST/v2/vectordb/collections/truncate
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
${CLUSTER_ENDPOINT}を、あなたのZilliz Cloudクラスターのエンドポイントに置き換える必要があります。- エンドポイントを取得するには、Describe Cluster V2 APIを使用してレスポンスから値を抽出してください。
shell
export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
パラメータ
Authorizationstringheader必要
認証トークンは、適切な権限を持つ API キー、またはコロンで連結されたユーザー名とパスワードのペア(例: username:password)である必要があります。プロジェクト エンドポイントを使用している場合は、十分な権限を持つ有効な API キーのみが使用できます。
値の例: Bearer {{TOKEN}}
リクエスト・ボディapplication/json
dbNamestring
コレクションが属するデータベースの名前。存在しないデータベースを指定するとエラーになります。指定されていない場合は、デフォルトのデータベースが使用されます。
collectionNamestring必要
対象コレクションの名前。 存在しないコレクションを指定するとエラーになります。
bash
export TOKEN="db_admin:xxxxxxxxxxxxx"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/truncate" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "my_collection"
}'
レスポンス200 OK - application/json
なし
codeinteger
応答コード。
dataobject
エラーメッセージを返します。
codeinteger
応答コード。
messagestring
エラーメッセージ。
Successjson
{
"code": 0,
"data": {}
}