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

# Replace a policy version in a bundle

> Atomically deactivates the current policy version and activates a new version. Set preview=true to get the impact without making changes.



## OpenAPI

````yaml /api-specs/6.3/public-api.json post /api/governance/v1/rpc/upgrade-bundle-policy
openapi: 3.0.3
info:
  title: Domino Public API
  description: Reference for Domino's public REST API endpoints.
  version: 6.3.1
  x-catalog-key: nucleus
servers:
  - url: https://mycluster.domino.tech
    description: >-
      Replace 'mycluster.domino.tech' with your Domino cluster hostname. For
      Domino Cloud customers, that is `your-subdomain`.domino.tech (e.g.,
      acme.domino.tech). For self-hosted deployments, it is the hostname you
      reach the Domino UI at.
security: []
tags:
  - name: Projects
  - name: Project templates
  - name: Workspaces
  - name: Jobs
  - name: HPC Jobs
  - name: Environments
  - name: Hardware Tiers
  - name: Datasets
  - name: Data Sources
  - name: AI Gateway
  - name: GenAI
  - name: AI Systems
  - name: Apps
  - name: App versions
  - name: App instances
  - name: Model APIs
  - name: Registered models
  - name: Model deployment
  - name: Extensions
  - name: Cost and billing
  - name: Users and organizations
  - name: Service accounts
  - name: Personal Access Tokens
  - name: Personal Access Tokens (admin)
  - name: Audit Trail
  - name: Custom metrics
  - name: PPM
  - name: Model Monitoring models
  - name: Model Monitoring drift and quality
  - name: Model Monitoring settings
  - name: Model Monitoring authentication
  - name: Governance bundles
  - name: Governance policies
  - name: Governance evidence and results
  - name: Governance operations
  - name: NetApp Volumes
  - name: NetApp Volumes snapshots
  - name: NetApp Volumes filesystems
  - name: NetApp Volumes transfers
  - name: Tags
  - name: Properties
externalDocs:
  description: OpenAPI
  url: https://swagger.io/resources/open-api/
paths:
  /api/governance/v1/rpc/upgrade-bundle-policy:
    post:
      tags:
        - Governance bundles
      summary: Replace a policy version in a bundle
      description: >-
        Atomically deactivates the current policy version and activates a new
        version. Set preview=true to get the impact without making changes.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/rai-guardrails-service_server.UpgradeBundlePolicyRequest
        description: Request to replace policy version
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionUpgradePlan
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rai-guardrails-service_server.HTTPError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rai-guardrails-service_server.HTTPError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rai-guardrails-service_server.HTTPError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rai-guardrails-service_server.HTTPError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rai-guardrails-service_server.HTTPError'
components:
  schemas:
    rai-guardrails-service_server.UpgradeBundlePolicyRequest:
      type: object
      required:
        - bundleId
        - currentPolicyVersionId
        - newPolicyVersionId
      properties:
        bundleId:
          type: string
        currentPolicyVersionId:
          type: string
        newPolicyVersionId:
          type: string
        preview:
          type: boolean
    rai-guardrails-service_guardrails.PolicyVersionUpgradePlan:
      type: object
      properties:
        approvals:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionUpgradeApprovalPlan
        findings:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionUpgradeFindingPlan
        policyVersionDiffSummary:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionDiffSummary
        results:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionUpgradeResultPlan
        stage:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionUpgradeAssignedStagePlan
        stageAssignees:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.PolicyVersionUpgradeStageAssigneesPlan
    rai-guardrails-service_server.HTTPError:
      type: object
      properties:
        code:
          description: >-
            Code is a stable machine-readable error identifier; absent on most
            errors.
          allOf:
            - $ref: '#/components/schemas/rai-guardrails-service_guardrails.ErrorCode'
        message:
          type: string
    rai-guardrails-service_guardrails.PolicyVersionUpgradeApprovalPlan:
      type: object
      properties:
        lost:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.ApprovalTransfer
        transferable:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.ApprovalTransfer
    rai-guardrails-service_guardrails.PolicyVersionUpgradeFindingPlan:
      type: object
      properties:
        lost:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.FindingTransfer
        transferable:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.FindingTransfer
    rai-guardrails-service_guardrails.PolicyVersionDiffSummary:
      type: object
      properties:
        approvals:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.DiffSummaryCount
        artifacts:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.DiffSummaryCount
        stages:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.DiffSummaryCount
    rai-guardrails-service_guardrails.PolicyVersionUpgradeResultPlan:
      type: object
      properties:
        lost:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.ResultTransfer
        transferable:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.ResultTransfer
    rai-guardrails-service_guardrails.PolicyVersionUpgradeAssignedStagePlan:
      type: object
      properties:
        reason:
          type: string
        source:
          type: string
        target:
          type: string
    rai-guardrails-service_guardrails.PolicyVersionUpgradeStageAssigneesPlan:
      type: object
      properties:
        lost:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.StageAssigneeTransfer
        transferable:
          type: array
          items:
            $ref: >-
              #/components/schemas/rai-guardrails-service_guardrails.StageAssigneeTransfer
    rai-guardrails-service_guardrails.ErrorCode:
      type: string
      enum:
        - BUNDLE_REQUIRES_POLICY
      x-enum-varnames:
        - CodeBundleRequiresPolicy
    rai-guardrails-service_guardrails.ApprovalTransfer:
      type: object
      properties:
        actionMeta:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.ActionMeta'
        approvers:
          type: array
          items:
            $ref: '#/components/schemas/rai-guardrails-service_guardrails.Approver'
        reason:
          type: string
        requiredFindingIds:
          items:
            type: string
          type: array
        result:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.Result'
        revalidation:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.Revalidation'
        source:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.ApprovalTransferInfo
        status:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.ApprovalStatus
        target:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.ApprovalTransferInfo
    rai-guardrails-service_guardrails.FindingTransfer:
      type: object
      properties:
        actionMeta:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.ActionMeta'
        approver:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.FindingUser'
        assignee:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.FindingUser'
        description:
          type: string
        dueDate:
          type: string
        name:
          type: string
        reason:
          type: string
        required:
          type: boolean
        severity:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.FindingSeverity
        source:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.FindingTransferInfo
        status:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.FindingStatus'
        target:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.FindingTransferInfo
        taskId:
          type: string
        updateActionMeta:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.ActionMeta'
    rai-guardrails-service_guardrails.DiffSummaryCount:
      type: object
      properties:
        added:
          type: integer
        changed:
          type: integer
        removed:
          type: integer
    rai-guardrails-service_guardrails.ResultTransfer:
      type: object
      properties:
        actionMeta:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.ActionMeta'
        content: {}
        reason:
          type: string
        source:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.ArtifactContentTransferInfo
        target:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.ArtifactContentTransferInfo
    rai-guardrails-service_guardrails.StageAssigneeTransfer:
      type: object
      properties:
        assignee:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.BundleStageAssignee
        reason:
          type: string
        source:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.StageAssigneeTransferInfo
        target:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.StageAssigneeTransferInfo
    rai-guardrails-service_guardrails.ActionMeta:
      type: object
      properties:
        date:
          type: string
        sourceEntityId:
          type: string
        user:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.User'
    rai-guardrails-service_guardrails.Approver:
      type: object
      required:
        - editable
        - id
        - name
        - showByDefault
      properties:
        editable:
          type: boolean
        fromOrganizationUserId:
          type: string
        id:
          type: string
        isOrganizationUser:
          type: boolean
        name:
          type: string
        showByDefault:
          type: boolean
    rai-guardrails-service_guardrails.Result:
      type: object
      required:
        - content
        - evidenceId
      properties:
        content:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.Content'
        evidenceId:
          type: string
    rai-guardrails-service_guardrails.Revalidation:
      type: object
      properties:
        createdAt:
          type: string
        createdBy:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.User'
        firstApprovedAt:
          type: string
        isOverride:
          type: boolean
        nextDeadlineAt:
          type: string
        revalidationConfig:
          $ref: >-
            #/components/schemas/rai-guardrails-service_guardrails.RevalidationConfig
        revalidationPeriodStartsAt:
          type: string
        updatedAt:
          type: string
        updatedBy:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.User'
    rai-guardrails-service_guardrails.ApprovalTransferInfo:
      type: object
      properties:
        stageApprovalId:
          type: string
    rai-guardrails-service_guardrails.ApprovalStatus:
      type: string
      enum:
        - PendingSubmission
        - PendingReview
        - Approved
        - ConditionallyApproved
        - PendingExpiration
        - Expired
      x-enum-varnames:
        - PendingSubmission
        - PendingReview
        - Approved
        - ConditionallyApproved
        - PendingExpiration
        - Expired
    rai-guardrails-service_guardrails.FindingUser:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        name:
          type: string
    rai-guardrails-service_guardrails.FindingSeverity:
      type: string
      enum:
        - S0
        - S1
        - S2
        - S3
      x-enum-varnames:
        - S0
        - S1
        - S2
        - S3
    rai-guardrails-service_guardrails.FindingTransferInfo:
      type: object
      properties:
        approvalId:
          type: string
        artifactId:
          type: string
        evidenceId:
          type: string
        findingId:
          type: string
    rai-guardrails-service_guardrails.FindingStatus:
      type: string
      enum:
        - ToDo
        - InProgress
        - InReview
        - Done
        - WontDo
      x-enum-varnames:
        - ToDo
        - InProgress
        - InReview
        - Done
        - WontDo
    rai-guardrails-service_guardrails.ArtifactContentTransferInfo:
      type: object
      properties:
        artifactId:
          type: string
        belongsToApproval:
          type: boolean
        evidenceId:
          type: string
    rai-guardrails-service_guardrails.BundleStageAssignee:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        name:
          type: string
    rai-guardrails-service_guardrails.StageAssigneeTransferInfo:
      type: object
      properties:
        stageId:
          type: string
        stageName:
          type: string
    rai-guardrails-service_guardrails.User:
      type: object
      properties:
        firstName:
          type: string
        id:
          type: string
        lastName:
          type: string
        userName:
          type: string
    rai-guardrails-service_guardrails.Content:
      type: object
      additionalProperties: {}
    rai-guardrails-service_guardrails.RevalidationConfig:
      type: object
      required:
        - openWindowDaysBefore
        - recurring
        - type
      properties:
        openWindowDaysBefore:
          type: integer
          minimum: 1
        recurring:
          $ref: '#/components/schemas/rai-guardrails-service_guardrails.Recurring'
        type:
          enum:
            - absolute
            - relative
          allOf:
            - $ref: >-
                #/components/schemas/rai-guardrails-service_guardrails.RevalidationType
    rai-guardrails-service_guardrails.Recurring:
      type: object
      required:
        - every
        - unit
      properties:
        every:
          type: integer
          minimum: 1
        startDate:
          type: string
        unit:
          enum:
            - month
            - year
          allOf:
            - $ref: >-
                #/components/schemas/rai-guardrails-service_guardrails.RevalidationUnit
    rai-guardrails-service_guardrails.RevalidationType:
      type: string
      enum:
        - absolute
        - relative
      x-enum-varnames:
        - RevalidationTypeAbsolute
        - RevalidationTypeRelative
    rai-guardrails-service_guardrails.RevalidationUnit:
      type: string
      enum:
        - month
        - year
      x-enum-varnames:
        - RevalidationUnitMonth
        - RevalidationUnitYear

````

## Related topics

- [Replace a bundle's primary policy with a different policy](/6.3/api-reference/governance-bundles/replace-a-bundles-primary-policy-with-a-different-policy.md)
- [Review and approve bundles](/6.3/platform-capabilities/features/governance/work-with-bundles/review-bundles.md)
- [Update the policy of a bundle](/6.3/api-reference/governance-bundles/update-the-policy-of-a-bundle.md)
- [Define policies](/6.3/platform-capabilities/features/governance/define-governance-policies/index.md)
