milvus-logo
LFAI
< Docs
  • RESTful

Describe Collection

Describes the details of a collection.

POST
/v2/vectordb/collections/describe
Cluster Endpoint

The base URL for this API is in the following format:

http://localhost:19530

export CLUSTER_ENDPOINT="http://localhost:19530"
Parameters
Authorizationstringheaderrequired

The authentication token should be a pair of colon-joined username and password, like username:password.

Example Value: Bearer {{TOKEN}}
Request Bodyapplication/json
dbNamestring

The name of the database.

collectionNamestringrequired

The name of the collection to describe.

export TOKEN="root:Milvus"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/describe" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "test_collection"
}'
Responses200 - application/json
codeinteger

Response code.

Example Value: 0
dataobject

Response payload, which carries detailed information about the specified collection.

aliasesarray

A list aliases assigned to the collection.

[]aliasesstring

An alias of the collection.

autoIDboolean

Whether the primary key of this collection automatically increments.

collectionIDinteger<int64>

The ID assigned to the collection upon creation.

collectionNamestring

The name of the current collection.

consistencyLevelstring

The consistency level of the current collection.

descriptionstring

The description of the collection.

enableDynamicFieldboolean

Whether the reserved dynamic field named $meta is enabled to save non-schema-defined fields and their values in key-value pairs.

fieldsarray

The collection fields in an array

[]fieldsobject

A field object.

autoIdboolean

Whether this field automatically increments its value.

descriptionstring

The description of the field.

idinteger

The field ID.

namestring

The name of the current field.

paramsarray

Other field parameters.

[]paramsobject

A field parameter in a key-value pair

keystring

Field parameter name.

valuestring

Field parameter value.

partitionKeyboolean

Whether this field serves as a partition key.

primaryKeyboolean

Whether this field serves as the primary key.

typestring

The data type of the field.

indexesarray

The created indexes in an array

[]indexesobject

A index object

fieldNamestring

The target field of this index.

indexNamestring

The name of this index.

metricTypestring

The metric type of this index.

loadstring

The load status of the current collection.

partitionNuminteger

The number of partitions in the collection.

propertiesarray

Extra collection properties in an array.

[]propertiesobject

A collection property object in a key-value pair.

keystring

The property name

valuestring

The property value.

shardsNuminteger

The number of shards created along with the collection.

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

{
"code": 0,
"data": {
"aliases": [],
"autoId": false,
"collectionID": 448707763883002000,
"collectionName": "test_collection",
"consistencyLevel": "Bounded",
"description": "",
"enableDynamicField": true,
"fields": [
{
"autoId": false,
"description": "",
"id": 100,
"name": "id",
"partitionKey": false,
"primaryKey": true,
"type": "Int64"
},
{
"autoId": false,
"description": "",
"id": 101,
"name": "vector",
"params": [
{
"key": "dim",
"value": "5"
}
],
"partitionKey": false,
"primaryKey": false,
"type": "FloatVector"
}
],
"indexes": [
{
"fieldName": "vector",
"indexName": "vector",
"metricType": "COSINE"
}
],
"load": "LoadStateLoaded",
"partitionsNum": 1,
"properties": [],
"shardsNum": 1
}
}