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

# Preview a marketplace install

> Resolve a candidate install/update and report its routes WITHOUT changing any
state: the resolved routes per item with ``route_mounts`` overrides applied, the
collisions against the live registry (excluding the plugin's own routes on an
update preview), the public routes requiring acceptance, and the ``new`` public
rows an update has not already approved (see :meth:`Installer.preview`).



## OpenAPI

````yaml /openapi.json post /api/marketplace/install/preview
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 14.0.2
servers: []
security: []
paths:
  /api/marketplace/install/preview:
    post:
      tags:
        - marketplace
      summary: Preview a marketplace install
      description: >-
        Resolve a candidate install/update and report its routes WITHOUT
        changing any

        state: the resolved routes per item with ``route_mounts`` overrides
        applied, the

        collisions against the live registry (excluding the plugin's own routes
        on an

        update preview), the public routes requiring acceptance, and the ``new``
        public

        rows an update has not already approved (see :meth:`Installer.preview`).
      operationId: post_api_marketplace_install_preview
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarketplaceInstallPreview'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/InstallPreview'
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict with the current resource state.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MarketplaceInstallPreview:
      description: >-
        Preview an install/update by ref: resolve the target spec and report its

        routes with any ``route_mounts`` base overrides applied, WITHOUT
        changing state.
      properties:
        ref:
          title: Ref
          type: string
        route_mounts:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          default: null
          title: Route Mounts
        version:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Version
      required:
        - ref
      title: MarketplaceInstallPreview
      type: object
    InstallPreview:
      description: >-
        A no-side-effect install/update preview: the resolved routes per item,
        the

        collisions against the live registry, the public rows requiring
        acceptance, the

        ``new_public_routes`` an update has not already approved, the required
        and missing

        env vars, and the delivery form.
      properties:
        collisions:
          items:
            $ref: '#/components/schemas/RouteCollision'
          title: Collisions
          type: array
        delivery:
          title: Delivery
          type: string
        items:
          items:
            $ref: '#/components/schemas/PreviewItem'
          title: Items
          type: array
        missing_env:
          items:
            type: string
          title: Missing Env
          type: array
        new_public_routes:
          items:
            $ref: '#/components/schemas/PublicRouteRow'
          title: New Public Routes
          type: array
        public_routes:
          items:
            $ref: '#/components/schemas/PublicRouteRow'
          title: Public Routes
          type: array
        ref:
          title: Ref
          type: string
        required_env:
          items:
            $ref: '#/components/schemas/RequiredEnvVar'
          title: Required Env
          type: array
        requires_public_acceptance:
          title: Requires Public Acceptance
          type: boolean
        version:
          title: Version
          type: string
      required:
        - ref
        - version
        - items
        - collisions
        - public_routes
        - new_public_routes
        - requires_public_acceptance
        - required_env
        - missing_env
        - delivery
      title: InstallPreview
      type: object
    Error:
      properties:
        code:
          description: >-
            Stable machine-readable reason a client keys a dedicated error state
            on, present on refusals that opt in (e.g. a 501 not-configured
            refusal). Optional: absent when the error carries only a
            human-readable message.
          type: string
        error:
          type: string
      required:
        - error
      type: object
    RouteCollision:
      description: A declared route that clashes with an already-owned one.
      properties:
        conflict_owner:
          title: Conflict Owner
          type: string
        conflict_path:
          title: Conflict Path
          type: string
        full_path:
          title: Full Path
          type: string
        item:
          title: Item
          type: string
        methods:
          items:
            type: string
          title: Methods
          type: array
      required:
        - item
        - full_path
        - methods
        - conflict_owner
        - conflict_path
      title: RouteCollision
      type: object
    PreviewItem:
      description: >-
        One route-carrying item in an install/update preview, with its resolved
        and

        declared bases and its routes.
      properties:
        base:
          title: Base
          type: string
        default_base:
          title: Default Base
          type: string
        item:
          title: Item
          type: string
        kind:
          title: Kind
          type: string
        routes:
          items:
            $ref: '#/components/schemas/PreviewItemRoute'
          title: Routes
          type: array
      required:
        - item
        - kind
        - base
        - default_base
        - routes
      title: PreviewItem
      type: object
    PublicRouteRow:
      description: A public route as an acceptance row.
      properties:
        full_path:
          title: Full Path
          type: string
        item:
          title: Item
          type: string
        methods:
          items:
            type: string
          title: Methods
          type: array
      required:
        - item
        - full_path
        - methods
      title: PublicRouteRow
      type: object
    RequiredEnvVar:
      description: An env var a plugin spec requires, with its derived secret-ness.
      properties:
        name:
          title: Name
          type: string
        secret:
          title: Secret
          type: boolean
      required:
        - name
        - secret
      title: RequiredEnvVar
      type: object
    PreviewItemRoute:
      description: One resolved route of a preview's route-carrying item.
      properties:
        full_path:
          title: Full Path
          type: string
        methods:
          items:
            type: string
          title: Methods
          type: array
        path:
          title: Path
          type: string
        public:
          title: Public
          type: boolean
      required:
        - path
        - full_path
        - methods
        - public
      title: PreviewItemRoute
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````