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

# Retire evaluations

> Explicitly abandon a bounded batch of pending evaluations pinned to the named evaluator whose latest error is evaluator_unavailable. Only the key's Organization and granted Corpora are considered. Live leases and withdrawals are left alone. Never migrate an intent, run another evaluator, create a Match or Delivery, or declare no_match. The terminal outcome is evaluator_retired. Each real retirement emits evaluation.retired in the intent's Corpus, with resource.kind=evaluation_retirement and resource.id=retirement_id. The immutable receipt records the reason, original identities and event ids, and is readable at the Location. A real key replay returns the original batch, including its original counts; another request or Corpus scope using that key is 409 idempotency_conflict. An empty real batch also reserves its key. dry_run selects without writes or reserving the key, and remaining reports how many unavailable intents would remain after that selection. Use new real keys for further batches and recheck live backlog counts after dispatch and leases settle. This action does not establish a policy for future intents. It deliberately discards potential alerts; restore the exact old implementation to drain without losing judgments. Requires plugins:admin.



## OpenAPI

````yaml /openapi.yaml post /v0/admin/subscriptions/evaluation-retirements
openapi: 3.1.0
info:
  title: Quivr HTTP API
  version: 0.0.0-draft
  description: >-
    Every endpoint of the Quivr v0 HTTP API. Send an API key as a bearer token;
    the key decides the Organization, the actions and the Corpora a request may
    reach.
servers: []
security:
  - ApiKey: []
paths:
  /v0/admin/subscriptions/evaluation-retirements:
    post:
      tags:
        - Admin
      summary: Retire evaluations
      description: >-
        Explicitly abandon a bounded batch of pending evaluations pinned to the
        named evaluator whose latest error is evaluator_unavailable. Only the
        key's Organization and granted Corpora are considered. Live leases and
        withdrawals are left alone. Never migrate an intent, run another
        evaluator, create a Match or Delivery, or declare no_match. The terminal
        outcome is evaluator_retired. Each real retirement emits
        evaluation.retired in the intent's Corpus, with
        resource.kind=evaluation_retirement and resource.id=retirement_id. The
        immutable receipt records the reason, original identities and event ids,
        and is readable at the Location. A real key replay returns the original
        batch, including its original counts; another request or Corpus scope
        using that key is 409 idempotency_conflict. An empty real batch also
        reserves its key. dry_run selects without writes or reserving the key,
        and remaining reports how many unavailable intents would remain after
        that selection. Use new real keys for further batches and recheck live
        backlog counts after dispatch and leases settle. This action does not
        establish a policy for future intents. It deliberately discards
        potential alerts; restore the exact old implementation to drain without
        losing judgments. Requires plugins:admin.
      operationId: retireEvaluations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluationRetirementRequest'
      responses:
        '200':
          description: The dry-run preview or committed audit receipt
          headers:
            Location:
              description: The receipt read URL, present only for a real batch.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluationRetirement'
        default:
          description: >-
            Structured error; 400 malformed, 401 unauthenticated, 403 without
            plugins:admin, 404 not configured, 409 idempotency_conflict, 422
            invalid_schema, invalid_input or invalid_limit, 503 storage
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EvaluationRetirementRequest:
      type: object
      additionalProperties: false
      required:
        - key
        - plugin_id
        - version
        - reason
        - dry_run
      properties:
        key:
          type: string
          minLength: 1
          maxLength: 128
        plugin_id:
          type: string
          minLength: 1
          maxLength: 128
        version:
          type: string
          minLength: 1
          maxLength: 128
        reason:
          type: string
          minLength: 1
          maxLength: 1024
          description: >-
            The operator's explanation for deliberately abandoning these
            evaluations.
        dry_run:
          type: boolean
        limit:
          type: integer
          minimum: 1
          maximum: 500
          default: 100
    EvaluationRetirement:
      type: object
      additionalProperties: false
      required:
        - key
        - plugin_id
        - version
        - reason
        - dry_run
        - limit
        - retirement_id
        - outcome
        - items
        - remaining
        - leased
      properties:
        key:
          type: string
        plugin_id:
          type: string
        version:
          type: string
        reason:
          type: string
        dry_run:
          type: boolean
        limit:
          type: integer
          minimum: 1
          maximum: 500
        retirement_id:
          type: string
          minLength: 1
        created_at:
          type: string
          format: date-time
        outcome:
          type: string
          enum:
            - evaluator_retired
        items:
          type: array
          maxItems: 500
          items:
            $ref: '#/components/schemas/RetiredEvaluation'
        remaining:
          type: integer
          minimum: 0
          description: >-
            Unavailable pending evaluations remaining in this request's scope,
            including leased ones.
        leased:
          type: integer
          minimum: 0
          description: >-
            Unavailable pending evaluations skipped because their leases have
            not expired.
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          minLength: 1
        message:
          type: string
          minLength: 1
        retryable:
          type: boolean
        field:
          type: string
          minLength: 1
          description: >-
            JSON Pointer (RFC 6901) to the request member that caused a 422,
            when known (for example /config/url or /credential/secret/token on
            connector commands).
        resync_url:
          type: string
          format: uri-reference
      required:
        - code
        - message
        - retryable
    RetiredEvaluation:
      type: object
      additionalProperties: false
      required:
        - subscription_id
        - subscription_version_id
        - sequence
        - corpus_id
        - record_id
        - record_version_id
      properties:
        subscription_id:
          type: string
        subscription_version_id:
          type: string
        sequence:
          type: integer
          format: int64
          description: The original trigger's Organization journal position.
        corpus_id:
          type: string
        record_id:
          type: string
        record_version_id:
          type: string
        event_id:
          type: string
          minLength: 1
          description: The evaluation.retired event; absent for a dry run.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        API key, not necessarily a JWT. Server derives Organization, permitted
        actions and Corpus scope; every resource access is authorized.

````

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