---
title: "Migrate subscription evaluators"
method: POST
path: "/v0/admin/subscriptions/evaluator-migrations"
tags: ["Admin"]
---

# Migrate subscription evaluators

`POST /v0/admin/subscriptions/evaluator-migrations`

## Request

- Base URL: `https://docs.quivr.thevibecompany.co` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.quivr.thevibecompany.co/v0/admin/subscriptions/evaluator-migrations`
- Auth: HTTP bearer

Move the key's Organization's Subscriptions from one version of an alert-rule plugin to the version the active Pipeline Plan serves, after that plugin's upgrade or rollback. It looks at the Subscriptions that are not deleted, enabled or disabled, whose current Version pins plugin_id at from_version, in Subscription id order, at most limit of them, after after. Each one's Saved Query expression and evaluator configuration must validate against the served version's schemas first; one that does not is listed in refused with the first issue and keeps its version. A moved Subscription gets a new current Version that keeps its Saved Query Version, configuration and destination and pins the served version. Like an edit, it judges only changes committed after it, nothing is re-evaluated, Matches keep the Version that produced them, and subscription.updated is announced in each of its Corpora. dry_run true validates and lists what would move without moving anything. A call moves each Subscription at most once; calling again with next_after continues, and repeating a call converges. Subscriptions whose Corpora the key does not all grant are left out. 422 unsupported_evaluator when no version of plugin_id serves new Subscriptions, invalid_migration when from_version is that version. Requires plugins:admin.

## Request body

- SubscriptionEvaluatorMigrationRequest
  - `plugin_id` string, required: The alert-rule plugin, such as alerts.
  - `from_version` string, required: The version the Subscriptions to move pin now.
  - `dry_run` boolean, required: true validates and lists what would move, without moving anything.
  - `limit` integer: The most Subscriptions this call looks at.
  - `after` string: Continue after this Subscription id, the next_after of the previous call.

## Response `200`

Successful response

- SubscriptionEvaluatorMigration
  - `plugin_id` string, required
  - `from_version` string, required
  - `to_version` string, required: The version the active plan serves, which moved Subscriptions pin.
  - `dry_run` boolean, required
  - `moved` SubscriptionEvaluatorMove[], required: The Subscriptions moved, or that would move in a dry run.
    - `subscription_id` string, required
    - `from_version_id` string, required: The Subscription Version that pinned from_version.
    - `version_id` string: The new current Subscription Version; absent in a dry run.
  - `refused` SubscriptionEvaluatorRefusal[], required: The Subscriptions left on from_version. code is invalid_expression or invalid_subscription_configuration when the served version's schemas refuse them (field and message name the first issue), or subscription_changed when the Subscription got another Version during the call.
    - `subscription_id` string, required
    - `version_id` string, required: Its current Subscription Version, which keeps from_version.
    - `code` string, required
    - `field` string
    - `message` string
  - `next_after` string: Present when more Subscriptions may pin from_version; pass it as after.

## Other responses

- `default`: Structured error; 400 malformed, 401 unauthenticated, 403 without plugins:admin, 422 invalid_schema, unsupported_evaluator or invalid_migration, 503 storage unavailable.

---

[API](https://skmtc.dev/thevibecompany/apis/quivr-http-api.md) - [All operations](https://skmtc.dev/thevibecompany/apis/quivr-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/thevibecompany/apis/quivr-http-api/revisions/4f4e30ba8f4e?raw)
