Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
searchIndexes
/
{id}
/
versions
GET /v1/searchIndexes/{id}/versions
from metadata.sdk import configure
from metadata.sdk.entities import SearchIndexes

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# List all versions
versions = SearchIndexes.get_versions("f5b0fa81-f241-4508-9219-dae31dcced18")
for v in versions:
    print(f"Version {v.version}: {v.description}")

# Get a specific version
si_v1 = SearchIndexes.get_specific_version(
    "f5b0fa81-f241-4508-9219-dae31dcced18",
    "0.1"
)
print(f"Original description: {si_v1.description}")
{
  "entityType": "searchIndex",
  "versions": [
    "{\"id\":\"f5b0fa81-f241-4508-9219-dae31dcced18\",\"name\":\"table_search_index\",\"fullyQualifiedName\":\"elasticsearch_sample.table_search_index\",\"version\":0.2,\"description\":\"Updated search index for table entities\",\"serviceType\":\"ElasticSearch\"}",
    "{\"id\":\"f5b0fa81-f241-4508-9219-dae31dcced18\",\"name\":\"table_search_index\",\"fullyQualifiedName\":\"elasticsearch_sample.table_search_index\",\"version\":0.1,\"description\":\"Search index for table entities\",\"serviceType\":\"ElasticSearch\"}"
  ]
}

Search Index Versions

Every change to a search index entity creates a new version. Use these endpoints to view the version history and retrieve specific versions.

List Versions

id
string
required
UUID of the search index.

Get Specific Version

Use GET /v1/searchIndexes/{id}/versions/{version} to retrieve a specific version.
id
string
required
UUID of the search index.
version
string
required
Version number to retrieve (e.g., 0.2).
GET /v1/searchIndexes/{id}/versions
from metadata.sdk import configure
from metadata.sdk.entities import SearchIndexes

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# List all versions
versions = SearchIndexes.get_versions("f5b0fa81-f241-4508-9219-dae31dcced18")
for v in versions:
    print(f"Version {v.version}: {v.description}")

# Get a specific version
si_v1 = SearchIndexes.get_specific_version(
    "f5b0fa81-f241-4508-9219-dae31dcced18",
    "0.1"
)
print(f"Original description: {si_v1.description}")
{
  "entityType": "searchIndex",
  "versions": [
    "{\"id\":\"f5b0fa81-f241-4508-9219-dae31dcced18\",\"name\":\"table_search_index\",\"fullyQualifiedName\":\"elasticsearch_sample.table_search_index\",\"version\":0.2,\"description\":\"Updated search index for table entities\",\"serviceType\":\"ElasticSearch\"}",
    "{\"id\":\"f5b0fa81-f241-4508-9219-dae31dcced18\",\"name\":\"table_search_index\",\"fullyQualifiedName\":\"elasticsearch_sample.table_search_index\",\"version\":0.1,\"description\":\"Search index for table entities\",\"serviceType\":\"ElasticSearch\"}"
  ]
}

Returns

List versions returns an object with entityType and a versions array of serialized entity snapshots (newest first). Get specific version returns the full search index object as it existed at that version.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
404NOT_FOUNDSearch index or version does not exist