All Products
Search
Document Center

DashVector:Create a partition

Last Updated:Mar 11, 2026

A partition is a logical subset of a collection that segments vector data.

Create a partition in a DashVector collection by calling the HTTP API described below.

Prerequisites

Before you begin, make sure that you have:

Method and URL

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

Example

Note

Before running this example:

  1. Replace <your-api-key> with your API key and <your-cluster-endpoint> with your cluster endpoint.

  2. Create a collection named quickstart. See the "Example" section in Create a collection.

The following request creates a partition named shoes in the quickstart collection:

API_KEY="<your-api-key>"
CLUSTER_ENDPOINT="<your-cluster-endpoint>"

curl -X POST \
  -H "dashvector-auth-token: ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "shoes"
  }' \
  "https://${CLUSTER_ENDPOINT}/v1/collections/quickstart/partitions"

Sample response:

{
  "request_id": "19215409-ea66-4db9-8764-26ce2eb5bb99",
  "code": 0,
  "message": ""
}

A code value of 0 confirms that the partition was created.

Request parameters

Parameter

Location

Type

Required

Description

{Endpoint}

path

str

Yes

The cluster endpoint. Find this on the cluster details page in the console.

{CollectionName}

path

str

Yes

The name of the collection to create the partition in.

dashvector-auth-token

header

str

Yes

The API key.

name

body

str

Yes

The name of the partition.

Response parameters

Parameter

Type

Description

Example

code

int

Status code. 0 indicates success. See Status codes.

0

message

str

Response message.

success

request_id

str

Unique request ID.

19215409-ea66-4db9-8764-26ce2eb5bb99