List partitions

更新时间:
复制 MD 格式

Retrieve all partition names in a DashVector collection through the HTTP API.

Prerequisites

Before you begin, ensure that you have:

Endpoint

GET https://{Endpoint}/v1/collections/{CollectionName}/partitions

Request parameters

ParameterLocationTypeRequiredDescription
{Endpoint}PathStringYesThe cluster endpoint. You can find it on the cluster details page in the console.
{CollectionName}PathStringYesThe name of the collection.
dashvector-auth-tokenRequest headerStringYesThe API key.

Response parameters

ParameterTypeDescriptionExample
codeIntegerStatus code. 0 indicates success. For details, see Status codes.0
messageStringStatus message.success
request_idStringUnique request ID.19215409-ea66-4db9-8764-26ce2eb5bb99
outputArrayPartition names in the collection.["default", "shoes"]

Example

Note

Replace <your-api-key> with your API key and <your-cluster-endpoint> with your cluster endpoint. This example uses a collection named quickstart. To create one, see Create a collection.

Request

curl -H 'dashvector-auth-token: <your-api-key>' \
  https://<your-cluster-endpoint>/v1/collections/quickstart/partitions

Response

{
  "request_id": "89557fca-50ca-400d-9828-a6c9ba5a4228",
  "code": 0,
  "message": "",
  "output": [
    "default",
    "shoes"
  ]
}