Create Collection (V1)Deprecated
This endpoint is deprecated. Please consider using the corresponding V2 endpoint instead.
Creates a collection in a cluster.
The base URL for this API is in the following format:
https://${CLUSTER_ENDPOINT}
- You need to fill in
${CLUSTER_ENDPOINT}with that of your Zilliz Cloud cluster. - To get the endpoint, use the Describe Cluster API to extract the values from the responses.
export CLUSTER_ENDPOINT=""
The authentication token should be an API key with appropriate privileges or a pair of colon-joined username and password, like username:password.
The name of the database. This parameter applies only to dedicated clusters.
The name of the collection to create.
The number of dimensions for the vector field of the collection.
The distance metric used for the collection.
The primary key field name.
The vector field.
The description of the collection
export TOKEN="db_admin:xxxxxxxxxxxxx"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v1/vector/collections/create" \
--header "Authorization: Bearer ${TOKEN}". \
--header "Request-Timeout: 10" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "medium_articles",
"dimension": 256,
"metricType": "COSINE",
"primaryField": "id",
"vectorField": "vector"
}'
Response code.
Response payload which is an empty object.
Returns an error message.
Response code.
Error message.
{
"code": 200,
"data": {}
}