milvus-logo
LFAI
< Docs
  • RESTful
    • v1

Describe Collection

Describes the details of a collection.

GET
https://${MILVUS_URI}/v1/vector/collections/describe

Example

Describe the details of a collection named medium_articles:

export MILVUS_URI="http://localhost:19530"


curl --request GET \
     --url "${MILVUS_URI}/v1/vector/collections/describe?collectionName=medium_articles" \
     --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": 200,
    "data": {
        "collectionName": "string",
        "description": "string",
        "enableDynamicField": "boolean",
        "fields": [
            {
                "autoId": "boolean",
                "description": "string",
                "name": "string",
                "primaryKey": "boolean",
                "type": "string"
            }
        ],
        "indexes": [
            {
                "fieldName": "string",
                "indexName": "string",
                "metricType": "string"
            }
        ],
        "load": "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.

PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 200: The request succeeds.
  • Others: Some error occurs.
dataobject
A data object.
data.collectionNamestring
The name of the collection.
data.descriptionstring
An optional description of the collection.
data.fieldsarray
An field array
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[].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

Error CodeDescription
800database not found
1800user hasn't authenticate
1802missing required parameters
Feedback

Was this page helpful?