Skip to main content

Update Collection

Update a collection's description.

PATCH /v1/collections/{collection_name}

Request

Headers:

x-api-key: your-api-key
Content-Type: application/json

Path Parameters:

FieldTypeRequiredDescription
collection_namestringYesName of the collection to update.

Body:

FieldTypeRequiredDescription
descriptionstring | nullNew description for the collection. Pass null to clear the description.

Example

curl -X PATCH http://localhost:8000/v1/collections/articles \
-H "x-api-key: your-key" \
-H "Content-Type: application/json" \
-d '{"description": "Updated description for articles"}'

Response

{
"status": "success",
"data": {
"name": "articles",
"dim": 384,
"distance_metric": "cosine",
"description": "Updated description for articles",
"vector_count": 150,
"created_at": "2024-01-15T10:00:00Z"
},
"error": null
}

Errors

CodeReason
404Collection not found
401Missing or invalid API key