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

# Downgrade Provider

> Queue a downgrade of an installed provider to an older version.

Symmetric to upgrade: updates ``installed_version``, transitions
the row to PENDING, and writes an UPGRADE_REQUESTED outbox entry.
The installer worker performs the deploy out of band.

Returns:
    The updated installed provider record (now PENDING).



## OpenAPI

````yaml https://api.pragmatiks.io/openapi.json post /providers/installed/{org}/{name}/downgrade
openapi: 3.1.0
info:
  title: Pragma API
  version: 0.1.0
servers: []
security: []
paths:
  /providers/installed/{org}/{name}/downgrade:
    post:
      tags:
        - providers
      summary: Downgrade Provider
      description: |-
        Queue a downgrade of an installed provider to an older version.

        Symmetric to upgrade: updates ``installed_version``, transitions
        the row to PENDING, and writes an UPGRADE_REQUESTED outbox entry.
        The installer worker performs the deploy out of band.

        Returns:
            The updated installed provider record (now PENDING).
      operationId: providers-downgrade_provider
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DowngradeProviderRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderInstallationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DowngradeProviderRequest:
      properties:
        target_version:
          type: string
          title: Target Version
      type: object
      required:
        - target_version
      title: DowngradeProviderRequest
      description: |-
        Request model for downgrading an installed store provider.

        Attributes:
            target_version: Target version to downgrade to (required).
    ProviderInstallationResponse:
      properties:
        prefix:
          type: string
          title: Prefix
        name:
          type: string
          title: Name
        installed_version:
          type: string
          title: Installed Version
        current_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Version
        upgrade_policy:
          $ref: '#/components/schemas/UpgradePolicy'
          default: manual
        resource_tier:
          $ref: '#/components/schemas/ResourceTier'
          default: standard
        config:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Config
        installed_at:
          type: string
          format: date-time
          title: Installed At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        lifecycle_state:
          $ref: '#/components/schemas/InstallationLifecycleState'
        health:
          $ref: '#/components/schemas/HealthStatus'
        health_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Health Message
        canonical:
          type: string
          title: Canonical
          description: >-
            Slash-joined ``prefix/name`` canonical string of the owning
            provider.


            Returns:
                Display form of the provider identity this installation targets.
          readOnly: true
      type: object
      required:
        - prefix
        - name
        - installed_version
        - installed_at
        - created_at
        - updated_at
        - lifecycle_state
        - health
        - canonical
      title: ProviderInstallationResponse
      description: |-
        Public-facing response model for a provider installation.

        Excludes internal infrastructure fields (deployment_name, service_name,
        current_image) that are not meaningful to API consumers.

        Attributes:
            prefix: Namespace token of the installed provider.
            name: Provider short name within the prefix.
            installed_version: Semver of the currently installed version.
            current_version: Version currently deployed (None if never deployed).
            upgrade_policy: Whether upgrades are applied automatically or manually.
            resource_tier: Resource allocation tier for the provider.
            config: Key-value pairs injected as environment variables on the deployment.
            installed_at: Timestamp when the provider was first installed.
            created_at: Creation timestamp.
            updated_at: Last update timestamp.
            lifecycle_state: Deploy lifecycle state of the installation
                (PENDING/PROCESSING/READY/FAILED/DELETING).
            health: Rolling reachability signal (``healthy`` or
                ``degraded``). Independent of lifecycle_state.
            health_message: Optional detail string for the last health
                transition; ``None`` when healthy or unset.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UpgradePolicy:
      type: string
      enum:
        - auto
        - manual
      title: UpgradePolicy
      description: How a tenant wants installed providers to be upgraded.
    ResourceTier:
      type: string
      enum:
        - free
        - standard
        - performance
      title: ResourceTier
      description: Resource allocation tier for an installed provider.
    InstallationLifecycleState:
      type: string
      enum:
        - pending
        - processing
        - ready
        - failed
        - deleting
      title: InstallationLifecycleState
      description: |-
        Lifecycle state of a ``ProviderInstallation``.

        Mirrors the resource lifecycle pattern: a single linear state owned
        by the installation row that platform workers transition forward.
        Distinct from :class:`DeploymentStatus`, which reflects the observed
        state of the underlying kubernetes Deployment.

        States:
            PENDING: Installation row created; no deploy attempt yet.
            PROCESSING: Deploy in flight (artifact apply or upgrade running).
            READY: Provider self-registered and is reachable.
            FAILED: Deploy or registration failed terminally.
            DELETING: Uninstall in progress; row will be removed when done.
    HealthStatus:
      type: string
      enum:
        - healthy
        - degraded
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````