Collections
All operations related to collections
Get all collections
Get all collections and their configurations
Responses
200
Returns a list of Collections along with their configurations.
application/json
400
Returns a bad request error.
application/json
get
GET /collections HTTP/1.1
Host:
Accept: */*
[
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
]
Get a collection
Get a specific collection and it's configuration using it's id or name.
Path parameters
collectionIdOrNamestring · min: 1Required
Responses
200
Returns the Collection information.
application/json
400
Returns a bad request error.
application/json
get
GET /collections/{collectionIdOrName} HTTP/1.1
Host:
Accept: */*
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
Create a collection
Body
namestringRequiredPattern:
^[a-zA-Z0-9_-]+$
descriptionstring | nullableOptional
Responses
200
Returns the created Collection information.
application/json
400
Returns a bad request error.
application/json
post
POST /collections HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
}
}
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
Delete a collection
Delete an existing collection using it's name or id.
Path parameters
collectionIdOrNamestring · min: 1Required
Responses
200
Returns the deleted Collection.
application/json
400
Returns a bad request error.
application/json
delete
DELETE /collections/{collectionIdOrName} HTTP/1.1
Host:
Accept: */*
{
"deleted": {
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
}
Update a collection
Update details of an existing collection.
Path parameters
collectionIdstring · min: 1Required
Body
namestringOptionalPattern:
^[a-zA-Z0-9_-]+$
descriptionstringOptional
Responses
200
Returns the updated collection information.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"name": "text",
"description": "text"
}
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
Query a collection for a vector value
Search a collection using a query vector. It retrieves the vectors that are most similar to the queried vector, along with their similarity scores.
Path parameters
collectionIdstring · min: 1Required
Body
limitnumberOptional
Responses
200
Returns a list of the matching Vectors in a Collection.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/query HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"vectors": [
[
1
]
],
"limit": 1
}
[
[
{
"id": "text",
"content": "text",
"metadata": null,
"distance": 1
}
]
]
Query a collection for a text
Search a collection using a text. It retrieves the vectors that are most similar to the queried text, along with their similarity scores.
Path parameters
collectionIdstring · min: 1Required
Body
contentstring[]Required
topKnumberOptional
Responses
200
Returns a list of the matching Vectors in a Collection.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/query/text HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"content": [
"text"
],
"topK": 1
}
[
[
{
"id": "text",
"content": "text",
"metadata": null,
"distance": 1
}
]
]
Last updated