Skip to main content

Describe Collection

Describes the details of a collection.


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

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/describe?collectionName=medium_articles" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json"

Success response:

{
"code": 200,
"data": {
"collectionName": "string",
"description": "string",
"fields": [
{
"autoId": true,
"description": "string",
"name": "string",
"primaryKey": true,
"type": "string"
}
],
"indexes": [
{
"fieldName": "string",
"indexName": "string",
"metricType": "string"
}
],
"load": "string",
"shardsNum": 0,
"enableDynamicField": true
}
}

Request

Parameters

  • Query parameters

    ParameterDescription
    collectionNamestring(required)
    The name of the collection to describe.
    dbNamestring
    The name of the database.
  • No path parameters required

Request Body

No request body required

Response

Returns the specified collection in detail.

Response Bodies

  • Response body if we process your request successfully
{
"code": "integer",
"data": {
"collectionName": "string",
"description": "string",
"fields": [
{
"autoId": "boolean",
"description": "string",
"name": "string",
"primaryKey": "boolean",
"type": "string"
}
],
"indexes": [
{
"fieldName": "string",
"indexName": "string",
"metricType": "string"
}
],
"load": "string",
"shardsNum": "integer",
"enableDynamicField": "boolean"
}
}
  • 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
dataobject
data.collectionNamestring
The name of the collection.
data.descriptionstring
An optional description of the collection.
data[].fieldsarray
An field array
data[].fields[]object
data[].fields[].autoIdboolean
Whether the primary key automatically increments.
data[].fields[].descriptionstring
An optional description of the field.
data[].fields[].namestring
The name of the field.
data[].fields[].primaryKeyboolean
Whether the field is a primary field.
data[].fields[].typestring
The data type of the values in this field.
data[].indexesarray
An index array
data[].indexes[]object
data[].indexes[].fieldNamestring
The name of the indexed field.
data[].indexes[].indexNamestring
The name of the generated index files.
data[].indexes[].metricTypestring
The metric type used in the index process.
data.loadstring
The load status of the collection. Possible values are unload, loading, and loaded.
data.shardsNuminteger
The number of shards in the collection.
data.enableDynamicFieldboolean
Whether the dynamic JSON feature is enabled for this collection.
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.
90001The collection xxx does not exist. You can use ListCollections to view the list of existing collections.
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.