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:passowrd.

export CLUSTER_ENDPOINT="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com:19530"
export TOKEN="db_admin:xxxxxxxxxxx"

curl --location --request POST "http://${CLUSTER_ENDPOINT}/v1/vector/collections/describe?collectionName=quick_setup" \

--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json"

Possible response is similar to the following.

{
"code": 200,
"data": {
"collectionName": "quick_setup",
"description": "",
"enableDynamicField": true,
"fields": [
{
"autoId": false,
"description": "",
"name": "id",
"partitionKey": false,
"primaryKey": true,
"type": "Int64"
},
{
"autoId": false,
"description": "",
"name": "vector",
"partitionKey": false,
"primaryKey": false,
"type": "FloatVector(5)"
}
],
"indexes": [
{
"fieldName": "vector",
"indexName": "vector",
"metricType": "COSINE"
}
],
"load": "LoadStateLoaded",
"shardsNum": 1
}
}

Request

Parameters

  • Query parameters

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

  • No header parameters required

Request Body

No request body required

Response

Returns the specified collection in detail.

Response Body

{
"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"
}
}
PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 0: The request succeeds.
  • Others: Some error occurs.
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.

Error Response

{
"code": integer,
"message": string
}
PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 0: The request succeeds.
  • Others: Some error occurs.
messagestring
Indicates the possible reason for the reported error.