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
Parameter Description collectionName string(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"
}
}
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | object |
data.collectionName | string The name of the collection. |
data.description | string An optional description of the collection. |
data[].fields | array An field array |
data[].fields[] | object |
data[].fields[].autoId | boolean Whether the primary key automatically increments. |
data[].fields[].description | string An optional description of the field. |
data[].fields[].name | string The name of the field. |
data[].fields[].primaryKey | boolean Whether the field is a primary field. |
data[].fields[].type | string The data type of the values in this field. |
data[].indexes | array An index array |
data[].indexes[] | object |
data[].indexes[].fieldName | string The name of the indexed field. |
data[].indexes[].indexName | string The name of the generated index files. |
data[].indexes[].metricType | string The metric type used in the index process. |
data.load | string The load status of the collection. Possible values are unload, loading, and loaded. |
data.shardsNum | integer The number of shards in the collection. |
data.enableDynamicField | boolean Whether the dynamic JSON feature is enabled for this collection. |
Error Response
{
"code": integer,
"message": string
}
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
message | string Indicates the possible reason for the reported error. |