> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcollate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Index Versions

> List and retrieve historical versions of a search index entity to track changes over time including field modifications, metadata updates, and change authors via the Collate REST API.

# 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, for example `0.2`.

```python GET /v1/searchIndexes/{id}/versions theme={null}
import json

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:
    version = json.loads(v)
    print(f"Version {version['version']}: {version.get('description')}")

# Get a specific version
si_v1 = SearchIndexes.get_specific_version(
    "f5b0fa81-f241-4508-9219-dae31dcced18",
    "0.1"
)
print(f"Original description: {getattr(si_v1.description, 'root', si_v1.description)}")
```

```java GET /v1/searchIndexes/{id}/versions theme={null}
import org.openmetadata.schema.entity.data.SearchIndex;
import org.openmetadata.schema.type.EntityHistory;

// client is an initialized OpenMetadataClient.

// List all versions
EntityHistory history = client.searchIndexes().getVersionList("f5b0fa81-f241-4508-9219-dae31dcced18");

for (Object version : history.getVersions()) {
    System.out.println("Version: " + version);
}

// Get a specific version
SearchIndex v1 = client.searchIndexes().getVersion("f5b0fa81-f241-4508-9219-dae31dcced18", 0.1);
System.out.println("Description: " + v1.getDescription());
```

```bash GET /v1/searchIndexes/{id}/versions theme={null}
# List all versions
curl "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/versions" \
  -H "Authorization: Bearer {access_token}"

# Get a specific version
curl "{base_url}/api/v1/searchIndexes/f5b0fa81-f241-4508-9219-dae31dcced18/versions/0.1" \
  -H "Authorization: Bearer {access_token}"
```

```json Response (List Versions) theme={null}
{
  "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

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `404` | `NOT_FOUND` | Search index or version does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.