本文介绍如何通过HTTP API删除Collection中一个已存在的Partition。
重要
删除Partition后,该Partition所有数据将删除且不可恢复,请谨慎操作。
前提条件
Method与URL
HTTP
DELETE https://{Endpoint}/v1/collections/{CollectionName}/partitions/{PartitionName}
使用示例
说明
-
需要使用您的api-key替换示例中的YOUR_API_KEY、您的Cluster Endpoint替换示例中的YOUR_CLUSTER_ENDPOINT,代码才能正常运行。
-
本示例需要参考新建Collection-使用示例提前创建好名称为
quickstart的Collection -
本示例需要参考新建Partition-使用示例提前创建好名称为
shoes的Partition
Shell
curl -XDELETE -H 'dashvector-auth-token: YOUR_API_KEY' \
https://YOUR_CLUSTER_ENDPOINT/v1/collections/quickstart/partitions/shoes
# example output:
# {"request_id":"40a883e4-4101-4045-b9e5-c1996ffd1034","code":0,"message":""}