本文介绍如何通过HTTP API为Collection创建一个新的Partition。
前提条件
Method与URL
HTTP
POST https://{Endpoint}/v1/collections/{CollectionName}/partitions
使用示例
说明
-
需要使用您的api-key替换示例中的YOUR_API_KEY、您的Cluster Endpoint替换示例中的YOUR_CLUSTER_ENDPOINT,代码才能正常运行。
-
本示例需要参考新建Collection-使用示例提前创建好名称为
quickstart的Collection
Shell
curl -XPOST \
-H 'dashvector-auth-token: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "shoes"
}' https://YOUR_CLUSTER_ENDPOINT/v1/collections/quickstart/partitions
# example output:
# {"request_id":"19215409-ea66-4db9-8764-26ce2eb5bb99","code":0,"message":""}