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

# Preview a plugin upgrade

> Resolve a marketplace version for an installed plugin, pull and probe its artifact, and report what would change: scopes, hooks, config schema fit, changelog. Nothing is written.



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /plugins/{id}/upgrade/preview
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /plugins/{id}/upgrade/preview:
    post:
      tags:
        - plugins
        - marketplace
      summary: Preview a plugin upgrade
      description: >-
        Resolve a marketplace version for an installed plugin, pull and probe
        its artifact, and report what would change: scopes, hooks, config schema
        fit, changelog. Nothing is written.
      parameters:
        - name: id
          in: path
          description: Plugin ID
          required: true
          schema:
            type: integer
      requestBody:
        description: Target version (defaults to the latest)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.PluginUpgradePreviewRequest'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/services.PluginUpgradePreview'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.PluginUpgradePreviewRequest:
      type: object
      properties:
        version:
          type: string
          description: empty = latest upgrade candidate
    services.PluginUpgradePreview:
      type: object
      properties:
        affects_edges:
          type: boolean
        changelog:
          type: string
        config_issues:
          type: array
          items:
            type: string
        config_schema:
          type: object
          additionalProperties: true
        deprecated:
          type: boolean
        deprecated_message:
          type: string
        hooks:
          $ref: '#/components/schemas/services.UpgradeDiff'
        installed_version:
          type: string
        is_downgrade:
          type: boolean
        latest_version:
          type: string
        marketplace_id:
          type: string
        min_studio_version:
          type: string
        plugin_id:
          type: integer
        plugin_name:
          type: string
        same_version:
          type: boolean
          description: already on the target; nothing to apply
        scopes:
          $ref: '#/components/schemas/services.UpgradeDiff'
        target_command:
          type: string
        target_version:
          type: string
        versions:
          type: array
          items:
            $ref: '#/components/schemas/services.UpgradeVersionOption'
        warnings:
          type: array
          items:
            type: string
    api.ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
      description: Error response model
    services.UpgradeDiff:
      type: object
      properties:
        added:
          type: array
          items:
            type: string
        current:
          type: array
          items:
            type: string
        removed:
          type: array
          items:
            type: string
        target:
          type: array
          items:
            type: string
    services.UpgradeVersionOption:
      type: object
      properties:
        deprecated:
          type: boolean
        enterprise_only:
          type: boolean
        installed:
          type: boolean
        released_at:
          type: string
        version:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````