本文介绍如何通过HTTP API获取Collection中一个已存在的Partition的状态。
前提条件
Method与URL
HTTP
GET 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 -H 'dashvector-auth-token: YOUR_API_KEY' \
https://YOUR_CLUSTER_ENDPOINT/v1/collections/quickstart/partitions/shoes
# example output:
# {"request_id":"296267a7-68e2-483a-87e6-5992d85a5806","code":0,"message":"","output":"SERVING"}
入参描述
参数
Location
类型
必填
说明
{Endpoint}
path
str
是
Cluster的Endpoint,可在控制台Cluster详情中查看
{CollectionName}
path
str
是
Collection名称
{PartitionName}
path
str
是
Partition名称
dashvector-auth-token
header
str
是
api-key
出参描述
字段
类型
描述
示例
code
int
返回值,参考返回状态码说明
0
message
str
返回消息
success
request_id
str
请求唯一id
19215409-ea66-4db9-8764-26ce2eb5bb99
output
str
参考Status