> ## 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.

# Promote vector space

> Make a registered evaluation space the one search uses, in one call, for the whole deployment. Coverage must be complete, that is every Corpus's routed generation carries the space with a vector for every current segment. Otherwise the answer is 409 coverage_incomplete, with the Corpora and segments it misses in the message, unless force is true. Every generation that carries the space and served the previous one serves it from then on, the default one included, so new Corpora start on it. The previous served space becomes an evaluation space and keeps its vectors, so promoting it again restores it. The choice survives restarts, activations and rollbacks while the ingestion plugin still enables both spaces. Promoting the served space changes nothing. Requires plugins:admin.



## OpenAPI

````yaml /openapi.yaml post /v0/admin/spaces/{vector_space_id}/promote
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/spaces/{vector_space_id}/promote:
    post:
      tags:
        - Admin
      summary: Promote vector space
      description: >-
        Make a registered evaluation space the one search uses, in one call, for
        the whole deployment. Coverage must be complete, that is every Corpus's
        routed generation carries the space with a vector for every current
        segment. Otherwise the answer is 409 coverage_incomplete, with the
        Corpora and segments it misses in the message, unless force is true.
        Every generation that carries the space and served the previous one
        serves it from then on, the default one included, so new Corpora start
        on it. The previous served space becomes an evaluation space and keeps
        its vectors, so promoting it again restores it. The choice survives
        restarts, activations and rollbacks while the ingestion plugin still
        enables both spaces. Promoting the served space changes nothing.
        Requires plugins:admin.
      operationId: promoteVectorSpace
      parameters:
        - name: vector_space_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VectorSpacePromotionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorSpacePromotion'
        default:
          description: >-
            Structured error; 400 malformed, 401 unauthenticated, 403 without
            plugins:admin, 404 unknown space, 409 coverage_incomplete, 422
            invalid_schema or not_evaluation_space (a retired space), 503
            storage unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    VectorSpacePromotionRequest:
      type: object
      additionalProperties: false
      properties:
        force:
          type: boolean
          default: false
          description: >-
            Promote even though some current segments have no vector in the
            space; those lose their semantic hits until a backfill fills them.
    VectorSpacePromotion:
      type: object
      additionalProperties: false
      properties:
        served_space_id:
          type: string
          minLength: 1
        previous_space_id:
          type: string
          description: >-
            The space it replaced, now for evaluation; empty when none was
            served.
        generations_switched:
          type: integer
          minimum: 0
          description: Generations that now serve the space.
        corpora_incomplete:
          type: integer
          minimum: 0
          description: Corpora whose routed generation lacks the space or a vector in it.
        segments_missing:
          type: integer
          minimum: 0
          description: Current segments without a vector in the space.
      required:
        - served_space_id
        - previous_space_id
        - generations_switched
        - corpora_incomplete
        - segments_missing
    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
  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.

````