Retrieve the status of a partition in a DashVector collection by using the HTTP API.
Method and URL
GET https://{Endpoint}/v1/collections/{CollectionName}/partitions/{PartitionName}Prerequisites
Before you begin, make sure that you have:
A DashVector cluster. See Create a cluster
An API key. See Manage API keys
The latest version of the DashVector SDK. See Install DashVector SDK
Request parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
{Endpoint} | Path | String | Yes | The cluster endpoint. Find this on the Cluster details page in the console. |
{CollectionName} | Path | String | Yes | The name of the collection that contains the partition. |
{PartitionName} | Path | String | Yes | The name of the partition to query. |
dashvector-auth-token | Header | String | Yes | The API key for authentication. |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
code | Integer | Status code. 0 indicates success. For other values, see Status codes. | 0 |
message | String | The returned message. | success |
request_id | String | Unique request identifier for troubleshooting. | 19215409-ea66-4db9-8764-26ce2eb5bb99 |
output | String | Current partition status. For all possible values, see Status. | SERVING |
Example
The following example retrieves the status of a partition named shoes in the quickstart collection.
Replace YOUR_API_KEY with your API key and YOUR_CLUSTER_ENDPOINT with the endpoint of your cluster.
Before running this example, create the required resources:
Create a collection (see the "Example" section)
Create a partition (see the "Example" section)
curl -H 'dashvector-auth-token: YOUR_API_KEY' \
https://YOUR_CLUSTER_ENDPOINT/v1/collections/quickstart/partitions/shoesSample response:
{
"request_id": "296267a7-68e2-483a-87e6-5992d85a5806",
"code": 0,
"message": "",
"output": "SERVING"
}The output field returns SERVING, which indicates the partition is ready to handle requests. For all possible status values, see Status.