curl --request POST \
--url https://{projectHost}/collections \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
}
}'
{
"projectName": "example-project-name",
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
},
"numDocs": 0,
"collectionStatus": "CREATING"
}
Create a collection.
curl --request POST \
--url https://{projectHost}/collections \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
}
}'
{
"projectName": "example-project-name",
"collectionName": "example-collection-name",
"indexConfigs": {
"example-field1": {
"type": "text",
"analyzers": [
"english"
]
},
"example-field2": {
"type": "vector",
"dimensions": 128,
"similarity": "cosine"
}
},
"numDocs": 0,
"collectionStatus": "CREATING"
}
Project API Key.
Created collection
The response is of type object
.
Was this page helpful?