Skip to content

Version Management API

List Versions

Retrieves a list of all versions for a collection, including the current active version.

Endpoint: GET /vectordb/collections/{collection_id}/versions

URL Parameters:

ParameterTypeRequiredDescription
collection_idstringYesID of the collection to retrieve versions for.

Response:

{
"versions": [
{
"hash": "a1b2c3d4",
"version_number": 3,
"timestamp": 1625097600,
"vector_count": 1250
},
{
"hash": "e5f6g7h8",
"version_number": 2,
"timestamp": 1625011200,
"vector_count": 1000
},
{
"hash": "i9j0k1l2",
"version_number": 1,
"timestamp": 1624924800,
"vector_count": 750
}
],
"current_hash": "a1b2c3d4"
}

Response Fields:

FieldTypeDescription
versionsarrayList of version metadata objects.
versions[].hashstringUnique hash identifier for the version.
versions[].version_numberintegerSequential version number.
versions[].timestampintegerUnix timestamp when the version was created.
versions[].vector_countintegerNumber of vectors in this version.
current_hashstringHash of the currently active version.

Status Codes:

CodeDescription
200Success. Returns the list of versions.
404Not Found. Collection not found.
500Server Error. Internal database or server error.

Get Current Version

Retrieves metadata for the currently active version of a collection.

Endpoint: GET /vectordb/collections/{collection_id}/versions/current

URL Parameters:

ParameterTypeRequiredDescription
collection_idstringYesID of the collection to retrieve current version for.

Response:

{
"hash": "a1b2c3d4",
"version_number": 3,
"timestamp": 1625097600,
"vector_count": 1250
}

Response Fields:

FieldTypeDescription
hashstringUnique hash identifier for the version.
version_numberintegerSequential version number.
timestampintegerUnix timestamp when the version was created.
vector_countintegerNumber of vectors in this version.

Status Codes:

CodeDescription
200Success. Returns the current version metadata.
404Not Found. Collection not found.
400Bad Request. Invalid version hash.
500Server Error. Internal database or server error.