Describe Collection
POST
http://${MILVUS_URI}/v2/vectordb/collections/describe
Describes the details of a collection.
Example
export MILVUS_URI="localhost:19530"
curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/collections/describe" \
--header "Content-Type: application/json" \
--data-raw '{
"dbName": "default",
"collectionName": "test_collection"
}'
Possible output would be similar to the following:
{
"code": 0,
"data": {
"aliases": [],
"autoId": false,
"collectionID": 448707763883002014,
"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
}
}
Request
Parameters
Header parameters
Parameter Description Request-Timeout
integer
The timeout duration for this operation. Setting this to None indicates that this operation times out when any response returns or an error occurs.Authorization
string
The authentication token.No query parameters required
No path parameters required
Request Body
{
"dbName": "string",
"collectionName": "string"
}
Parameter | Description |
---|---|
dbName | string The name of the database. |
collectionName * | string The name of the collection to describe. |
Response
Returns the specified collection in detail.
Response Bodies
- Response body if we process your request successfully
{
"code": "integer",
"data": {
"aliases": [
{}
],
"autoID": "boolean",
"collectionID": "integer",
"collectionName": "string",
"consistencyLevel": "string",
"description": "string",
"enableDynamicField": "boolean",
"fields": [
{
"autoId": "boolean",
"description": "string",
"id": "integer",
"name": "string",
"params": [
{
"key": "string",
"value": "string"
}
],
"partitionKey": "boolean",
"primaryKey": "boolean",
"type": "string"
}
],
"indexes": [
{
"fieldName": "string",
"indexName": "string",
"metricType": "string"
}
],
"load": "string",
"partitionNum": "integer",
"properties": [
{
"key": "string",
"value": "string"
}
],
"shardsNum": "integer"
}
}
- 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.
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
message | string Indicates the possible reason for the reported error. |
data | object |
data[].aliases | array A list aliases assigned to the collection. |
data[].aliases[] | string An alias of the collection. |
data.autoID | boolean Whether the primary key of this collection automatically increments. |
data.collectionID | integer The ID assigned to the collection upon creation. |
data.collectionName | string The name of the current collection. |
data.consistencyLevel | string The consistency level of the current collection. |
data.description | string The description of the collection. |
data.enableDynamicField | boolean Whether the reserved dynamic field named $meta is enabled to save non-schema-defined fields and their values in key-value pairs. |
data[].fields | array The collection fields in an array |
data[].fields[] | object A field object. |
data[].fields[].autoId | boolean Whether this field automatically increments its value. |
data[].fields[].description | string The description of the field. |
data[].fields[].id | integer The field ID. |
data[].fields[].name | string The name of the current field. |
data[].fields[][].params | array Other field parameters. |
data[].fields[][].params[] | object A field parameter in a key-value pair |
data[].fields[][].params[].key | string Field parameter name. |
data[].fields[][].params[].value | string Field parameter value. |
data[].fields[].partitionKey | boolean Whether this field serves as a partition key. |
data[].fields[].primaryKey | boolean Whether this field serves as the primary key. |
data[].fields[].type | string The data type of the field. |
data[].indexes | array The created indexes in an array |
data[].indexes[] | object A index parameter object |
data[].indexes[].fieldName | string The target field of this index. |
data[].indexes[].indexName | string The name of this index. |
data[].indexes[].metricType | string The metric type of this index. |
data.load | string The load status of the current collection. |
data.partitionNum | integer The number of partitions in the collection. |
data[].properties | array Extra collection properties in an array. |
data[].properties[] | object A collection property object in a key-value pair. |
data[].properties[].key | string The property name |
data[].properties[].value | string The property value. |
data.shardsNum | integer The number of shards created along with the collection. |