Skip to content

Version Previews API ​

A version preview shows you how a newer Typesense Server version handles your cluster's real traffic, before you upgrade. We create two temporary single-node copies of your cluster, one on its current version and one on the version you want to preview. Both copies receive the same writes and searches as your cluster for as long as the preview runs, and the report lists the writes the new version handled differently, the searches it answered differently and the search latency of both versions side by side.

Cost

Each copy has your cluster's RAM, CPU and disk, and is billed at the hourly price of a node with that configuration until the preview ends. If your collections or searches use a remote embedding model or an AI model, both copies call that model with your API key for it. So those calls add to your bill with that provider and count towards its rate limit.

Workflow ​

Here's a typical sequence of API calls you'd perform when using this API:

  1. Start a version preview (which is an asynchronous process).
  2. Poll the version preview info endpoint to follow the report as it fills in. Loading your cluster's data into the copies takes a few minutes to a few hours, depending on the size of your dataset. The preview's duration starts after that.
  3. If you need to, stop the preview before its end time.

Start a version preview ​

Here's how you start a 24-hour preview of Typesense Server 31.0:

shell
curl -X POST --location "https://cloud.typesense.org/api/v1/clusters/<ClusterId>/version-previews" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "X-TYPESENSE-CLOUD-MANAGEMENT-API-KEY: YOUR-API-KEY" \
    -d '{
          "target_version": "31.0",
          "duration_hours": 24,
          "notification_email_addresses": ["email@example.com"]
        }'

Response:

json
{
  "success": true,
  "version_preview": {
    "id": "3f6a0c52-8e1d-4b7a-9c39-5d2e7b41a0f8",
    "status": "pending",
    "ended_reason": null,
    "current_version": "30.2",
    "target_version": "31.0",
    "starts_at": null,
    "ends_at": 1792553400,
    "ended_at": null,
    "notification_email_addresses": [
      "email@example.com"
    ],
    "report": null
  }
}

Note

Upgrading the cluster is a configuration change, and starting one ends a running preview. So you want to upgrade once you've read the report.

Request Parameters ​

ParameterRequiredDescription
target_versionRequiredThe Typesense Server version to preview, for example 31.0. It has to be newer than the cluster's current version.
duration_hoursOptionalHow long the preview runs, in whole hours from 1 to 72, counted from when your cluster's data has been loaded into the copies. Default: 24
notification_email_addressesOptionalAn array of email addresses to notify when the preview ends.

Error Responses ​

The API returns HTTP 422 and doesn't start the preview when:

  • the cluster isn't a paid cluster, or isn't In Service
  • the account has no payment method on file, or not enough prepaid credit
  • another version preview on the cluster is running
  • a cloning operation, a configuration change or a rolling restart on the cluster is scheduled or in progress, or a backup of the cluster is running
  • version previews aren't available for the cluster's current version or region
  • target_version isn't an available Typesense Server version, or isn't newer than the cluster's current version
  • search logging is turned on for the cluster, or the cluster has the enable-search-logging server parameter set
  • one of the cluster's nodes averaged more than 100 searches per second in its busiest hour of the last 7 days
  • one of the cluster's nodes didn't have enough free memory for a preview at its lowest point in the last 7 days

It returns HTTP 400 when a parameter isn't valid, and HTTP 403 when the account has unpaid invoices with failed payments.

Get single version preview ​

This endpoint returns a single version preview, with its report so far. In the report, current_version holds the results from the copy on your cluster's current version, and target_version the results from the copy on the new version.

shell
curl -X GET --location "https://cloud.typesense.org/api/v1/clusters/<ClusterID>/version-previews/<PreviewId>" \
      -H "Accept: application/json" \
      -H "X-TYPESENSE-CLOUD-MANAGEMENT-API-KEY: YOUR-API-KEY"

Response:

json
{
  "id": "3f6a0c52-8e1d-4b7a-9c39-5d2e7b41a0f8",
  "status": "running",
  "ended_reason": null,
  "current_version": "30.2",
  "target_version": "31.0",
  "starts_at": 1792424700,
  "ends_at": 1792511100,
  "ended_at": null,
  "notification_email_addresses": [
    "email@example.com"
  ],
  "report": {
    "updated_at": "2026-10-19T19:00:00Z",
    "lag_seconds": 42,
    "coverage": {
      "searches_compared": 1200,
      "writes_compared": 310,
      "searches_logged": 1290,
      "skipped_at_peak": 0,
      "nondeterministic": 40,
      "too_large": 2,
      "could_not_replay": 1,
      "not_replayed_writes": 0,
      "missed_by_node": [
        { "node": "xyz-1.a1.typesense.net", "missed": 0, "unknown_minutes": 0 }
      ]
    },
    "write_differences": {
      "count": 1,
      "examples": [
        {
          "route": "POST /collections/:collection/documents/import",
          "collection": "books",
          "current_version": { "status": 200, "error": null },
          "target_version": { "status": 400, "error": "Field `year` must be an int32." }
        }
      ]
    },
    "search_differences": {
      "count": 0,
      "downstream_of_write_difference": 3,
      "examples": []
    },
    "latency_ms": {
      "current_version": { "p50": 4, "p95": 11, "p99": 19 },
      "target_version": { "p50": 3, "p95": 10, "p99": 18 }
    }
  }
}

Response Parameters ​

starts_at, ends_at and ended_at are Unix timestamps in seconds. current_version is your cluster's version when the preview started. Until your cluster's data has been loaded, ends_at is the latest the preview can end: 12 hours for loading, then duration_hours.

status ​

statusDescription
pendingThe copies are being created.
copying_dataYour cluster's data is being loaded into the copies.
runningBoth copies are receiving your cluster's writes and searches. starts_at is when they started.
endingThe preview is stopping, and the copies are being terminated.
endedThe preview has ended. ended_reason says why.
failedYour cluster's data couldn't be loaded into the copies, so the preview never started. ended_reason is data_copy_failed.

ended_reason ​

ended_reason is null while the preview runs.

ended_reasonDescription
completedThe preview reached ends_at.
stoppedThe preview was stopped before its end time.
fell_behindThe copies couldn't keep up with the writes to your cluster.
replay_failedWe couldn't keep sending your cluster's writes and searches to the copies.
target_version_copy_failedThe copy on the new version stopped working or restarted.
current_version_copy_failedThe copy on your cluster's current version stopped working or restarted.
configuration_changeA configuration change started on your cluster.
cluster_not_in_serviceYour cluster was no longer In Service.
data_copy_failedYour cluster's data couldn't be loaded into the copies, or loading it took more than 12 hours.

report ​

report is null until the copies have compared their first searches and writes.

FieldDescription
updated_atWhen the report was last updated.
lag_secondsHow far behind your cluster the report is, in seconds: from when your cluster received the newest search in the report to updated_at. If it passes 3600, the preview ends with replay_failed.
coverage.searches_comparedSearches both copies ran and the report compared.
coverage.writes_comparedWrites both copies applied and the report compared.
coverage.searches_loggedSearches your cluster served while the preview ran.
coverage.skipped_at_peakSearches left out during traffic peaks, so the copies could keep up.
coverage.nondeterministicSearches whose results can differ from one run to the next on the same version (vector or hybrid search, random sort, time-based filters and AI answers), so they aren't compared.
coverage.too_largeSearches too large to send to the copies.
coverage.could_not_replaySearches that couldn't be sent to the copies for a reason other than their size.
coverage.not_replayed_writesWrites neither copy could apply.
coverage.missed_by_nodeFor each of your cluster's nodes, the searches it served that didn't reach the copies (missed) and the minutes whose search count couldn't be read (unknown_minutes).
write_differences.countWrites the two versions answered differently.
write_differences.examplesUp to 20 of those writes, each with its route, its collection and the status and error from current_version and target_version.
search_differences.countSearches the two versions answered differently.
search_differences.downstream_of_write_differenceDiffering searches on a collection where a write had already differed, so the two copies no longer held the same data. These aren't part of count.
search_differences.examplesUp to 20 of those searches, each with its path, its search parameters in query and what current_version and target_version returned: the status, found and the IDs of the top hits in order. With group_by, groups holds each group's hits. For a multi-search, results holds each search's answer.
latency_msSearch latency of each copy in milliseconds, as p50, p95 and p99 for current_version and target_version.

The examples never include API key values. They're removed from the report 30 days after the preview ends.

List all version previews ​

Version previews are listed newest first, without the examples in their reports. To read the examples, get a single version preview.

shell
curl -X GET --location "https://cloud.typesense.org/api/v1/clusters/<ClusterID>/version-previews?per_page=1" \
      -H "Accept: application/json" \
      -H "X-TYPESENSE-CLOUD-MANAGEMENT-API-KEY: YOUR-API-KEY"

Response:

json
{
  "page": 1,
  "per_page": 1,
  "total": 2,
  "version_previews": [
    {
      "id": "3f6a0c52-8e1d-4b7a-9c39-5d2e7b41a0f8",
      "status": "ended",
      "ended_reason": "completed",
      "current_version": "30.2",
      "target_version": "31.0",
      "starts_at": 1792424700,
      "ends_at": 1792511100,
      "ended_at": 1792511100,
      "notification_email_addresses": [
        "email@example.com"
      ],
      "report": { ... }
    }
  ]
}

Request Parameters ​

ParameterRequiredDescription
per_pageOptionalThe number of results per page, up to 10. Default: 10
pageOptionalPage number to fetch. Default: 1

Stop a version preview ​

This endpoint stops a version preview before its end time. Both copies are terminated, so billing for them stops, and the preview and its report stay available.

shell
curl -X DELETE --location "https://cloud.typesense.org/api/v1/clusters/<ClusterID>/version-previews/<PreviewId>" \
      -H "Accept: application/json" \
      -H "X-TYPESENSE-CLOUD-MANAGEMENT-API-KEY: YOUR-API-KEY"

Response:

json
{
  "success": true,
  "version_preview": {
    "id": "3f6a0c52-8e1d-4b7a-9c39-5d2e7b41a0f8",
    "status": "ending",
    "ended_reason": "stopped",
    "current_version": "30.2",
    "target_version": "31.0",
    "starts_at": 1792424700,
    "ends_at": 1792511100,
    "ended_at": null,
    "notification_email_addresses": [
      "email@example.com"
    ],
    "report": { ... }
  }
}

Permissions ​

To start or stop a version preview, you need a key with the clusters:preview_version capability. To get or list version previews, you need clusters:read. The examples in a report hold your search queries and the document ids your searches returned, so only an admin key reads them. See capabilities.