Skip to main content

List Collections

Lists collections in a cluster.


GET
https://{cluster-endpoint}/v1/vector/collections

Example

Notes

You can use either of the following ways to authorize:

  • An API Key with appropriate permissions.
  • A colon-joined username and password of the target cluster. For example, username:p@ssw0rd.
curl --request GET \
--url "${CLUSTER_ENDPOINT}/v1/vector/collections" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json"

Sample response:

{
code: 200,
data: [
"collection1",
"collection2",
...
"collectionN",
]
}

Request

Parameters

  • Query parameters

    ParameterDescription
    dbNamestring
    The name of the database
  • No path parameters required

Request Body

No request body required

Response

Returns a list of collections in the specified cluster.

Response Bodies

  • Response body if we process your request successfully
{
"code": "integer",
"data": [
{}
]
}
  • Response body if we failed to process your request
{
"code": integer,
"message": string
}

Properties

The properties in the returned response are listed in the following table.

PropertyDescription
codeinteger
dataarray
data[]string
messagestring
Indicates the possible reason for the reported error.

Possible Errors

CodeError Message
80000Incorrect parameter: xxx
80001The token is illegal
80002The token is invalid
80020Cluster not exist or you don't have permission.
80022Dedicated cluster not support this operation.
90011Invalid CollectionName. Reason: Name contains only alphanumeric letters and underscores
90102The cluster does not exist in current region.
90103The clusterId parameter is empty in the request path.