> ## 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.0
  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: AIGateway
    x-displayName: AIGateway
  - name: AppInstances
    x-displayName: AppInstances
  - name: AppVersions
    x-displayName: AppVersions
  - name: Apps
    x-displayName: Apps
  - name: AsyncPredictions
    x-displayName: AsyncPredictions
  - name: AuditTrail
    x-displayName: AuditTrail
  - name: BillingTag
    x-displayName: BillingTag
  - name: BillingTagSettings
    x-displayName: BillingTagSettings
  - name: Cost
    x-displayName: Cost
  - name: CustomMetrics
    x-displayName: CustomMetrics
  - name: DataSource
    x-displayName: DataSource
  - name: DatasetRw
    x-displayName: DatasetRw
  - name: DeploymentTargets
    x-displayName: DeploymentTargets
  - name: Environments
    x-displayName: Environments
  - name: Extensions
    x-displayName: Extensions
  - name: GenAI
    x-displayName: GenAI
  - name: HPC Jobs
    x-displayName: HPC Jobs
  - name: HardwareTier
    x-displayName: HardwareTier
  - name: Jobs
    x-displayName: Jobs
  - name: ModelAPI
    x-displayName: ModelAPI
  - name: ModelAPIVersion
    x-displayName: ModelAPIVersion
  - name: ModelDeployment
    x-displayName: ModelDeployment
  - name: Organizations
    x-displayName: Organizations
  - name: PPM
    x-displayName: PPM
  - name: PersonalAccessToken
    x-displayName: PersonalAccessToken
  - name: ProjectSharedDatasets
    x-displayName: ProjectSharedDatasets
  - name: ProjectTemplates
    x-displayName: ProjectTemplates
  - name: Projects
    x-displayName: Projects
  - name: ProjectsCommits
    x-displayName: ProjectsCommits
  - name: ProjectsFiles
    x-displayName: ProjectsFiles
  - name: RegisteredModels
    x-displayName: RegisteredModels
  - name: ServiceAccounts
    x-displayName: ServiceAccounts
  - name: Users
    x-displayName: Users
  - name: Workspaces
    x-displayName: Workspaces
  - name: nucleus_other
    x-displayName: other
  - name: PersonalAccessTokenAdmin
    x-displayName: PersonalAccessTokenAdmin
  - name: Git Credentials
    x-displayName: Git Credentials
  - name: Activity
    x-displayName: Activity
  - name: Admin
    x-displayName: Admin
  - name: Notifications
    x-displayName: Notifications
  - name: Adminnotifications
    x-displayName: Adminnotifications
  - name: UserManagement
    x-displayName: UserManagement
  - name: WhiteLabel
    x-displayName: WhiteLabel
  - name: Authentication and Authorization
    x-displayName: Authentication and Authorization
  - name: Code
    x-displayName: Code
  - name: ComputeCluster
    x-displayName: ComputeCluster
  - name: Control Center
    x-displayName: Control Center
  - name: controlcenter
    x-displayName: controlcenter
  - name: DataSourceCredential
    x-displayName: DataSourceCredential
  - name: DataMount
    x-displayName: DataMount
  - name: DataPlane
    x-displayName: DataPlane
  - name: dataset
    x-displayName: dataset
  - name: Datasets
    x-displayName: Datasets
  - name: datasetrw.api
    x-displayName: datasetrw.api
  - name: DatasetObjectStore
    x-displayName: DatasetObjectStore
  - name: DevelopV1ProjectTemplates
    x-displayName: DevelopV1ProjectTemplates
  - name: DevelopV1Projects
    x-displayName: DevelopV1Projects
  - name: Execution Events
    x-displayName: Execution Events
  - name: Files
    x-displayName: Files
  - name: Frontend
    x-displayName: Frontend
  - name: Gateway
    x-displayName: Gateway
  - name: Runs
    x-displayName: Runs
  - name: Search
    x-displayName: Search
  - name: Git
    x-displayName: Git
  - name: Metadata
    x-displayName: Metadata
  - name: Gruz
    x-displayName: Gruz
  - name: Guardrails
    x-displayName: Guardrails
  - name: Hardware Tier
    x-displayName: Hardware Tier
  - name: ActionableInsights
    x-displayName: ActionableInsights
  - name: Socket
    x-displayName: Socket
  - name: Job
    x-displayName: Job
  - name: Tags
    x-displayName: Tags
  - name: JobComments
    x-displayName: JobComments
  - name: LogsWithProblemSuggestion
    x-displayName: LogsWithProblemSuggestion
  - name: JobResults
    x-displayName: JobResults
  - name: Layout
    x-displayName: Layout
  - name: Metrics
    x-displayName: Metrics
  - name: MLFlow
    x-displayName: MLFlow
  - name: ModelManager
    x-displayName: ModelManager
  - name: Model Products
    x-displayName: Model Products
  - name: Project Goals
    x-displayName: Project Goals
  - name: ProjectManagement
    x-displayName: ProjectManagement
  - name: Templates
    x-displayName: Templates
  - name: Project
    x-displayName: Project
  - name: Launchers
    x-displayName: Launchers
  - name: Scheduled Jobs
    x-displayName: Scheduled Jobs
  - name: Quota
    x-displayName: Quota
  - name: RemoteFileSystem
    x-displayName: RemoteFileSystem
  - name: Scheduled Runs
    x-displayName: Scheduled Runs
  - name: Workspace
    x-displayName: Workspace
  - name: Logs
    x-displayName: Logs
  - name: WorkspaceComments
    x-displayName: WorkspaceComments
  - name: WorkspaceResults
    x-displayName: WorkspaceResults
  - name: Resource
    description: The Data Plane Resource API
    x-displayName: Resource
  - name: authz
    x-displayName: authz
  - name: volumes
    x-displayName: volumes
  - name: data transfers
    x-displayName: data transfers
  - name: downloads
    x-displayName: downloads
  - name: filesystems
    x-displayName: filesystems
  - name: snapshots
    x-displayName: snapshots
  - name: tasks
    x-displayName: tasks
  - description: Manage taxonomy namespaces.
    name: Tagging - Namespaces
    x-displayName: Tagging - Namespaces
  - description: Manage tags within namespaces.
    name: Tagging - Tags
    x-displayName: Tagging - Tags
  - description: Assign, remove, and list tag assignments on entities.
    name: Tagging - Entity Tags
    x-displayName: Tagging - Entity Tags
  - description: Look up entities by tag.
    name: Tagging - Entities
    x-displayName: Tagging - Entities
  - description: Fetch the full namespace + tag hierarchy.
    name: Tagging - Taxonomy Tree
    x-displayName: Tagging - Taxonomy Tree
  - description: Validate and import taxonomy data from a file.
    name: Tagging - Import
    x-displayName: Tagging - Import
  - description: Export the current taxonomy to a file.
    name: Tagging - Export
    x-displayName: Tagging - Export
  - description: Internal-only endpoints for service-account callers.
    name: Tagging - Internal
    x-displayName: Tagging - Internal
  - description: Manage property definitions and their groups.
    name: Properties - Definitions
    x-displayName: Properties - Definitions
  - description: Read and update an entity's property values.
    name: Properties - Values
    x-displayName: Properties - Values
  - description: Internal-only endpoints for service-account callers (properties).
    name: Properties - Internal
    x-displayName: Properties - Internal
  - name: config
    x-displayName: config
  - name: Workloads
    description: Everything related to deploying and managingDomino Workloads
    x-displayName: Workloads
  - name: Executor
    description: Executor-related commands
    x-displayName: Executor
  - name: HPC
    description: HPC workload management
    x-displayName: HPC
  - name: Endpoints
    x-displayName: Endpoints
  - name: mlflow-proxy_other
    x-displayName: other
  - name: attachments
    x-displayName: attachments
  - name: bundle-stages
    x-displayName: bundle-stages
  - name: bundles
    x-displayName: bundles
  - name: findings
    x-displayName: findings
  - name: drafts
    x-displayName: drafts
  - name: evidence-templates
    x-displayName: evidence-templates
  - name: policies
    x-displayName: policies
  - name: policy-versions
    x-displayName: policy-versions
  - name: policy-enforcers
    x-displayName: policy-enforcers
  - name: results
    x-displayName: results
  - name: rpc
    x-displayName: rpc
  - name: approvals
    x-displayName: approvals
  - description: >-
      Create, query, bulk-update, and evaluate priority-based access control
      rules.
    name: rules
    x-displayName: rules
  - name: domino-connect_other
    x-displayName: other
  - name: events
    x-displayName: events
  - name: curated-central-configs
    x-displayName: curated-central-configs
  - name: nodepools
    x-displayName: nodepools
  - name: ip-allowlist
    x-displayName: ip-allowlist
externalDocs:
  description: OpenAPI
  url: https://swagger.io/resources/open-api/
paths:
  /api/governance/v1/rpc/upgrade-bundle-policy:
    post:
      tags:
        - 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/bundles/replace-a-bundles-primary-policy-with-a-different-policy.md)
- [Update the policy of a bundle](/6.3/api-reference/bundles/update-the-policy-of-a-bundle.md)
- [Define policies](/6.3/platform-capabilities/features/governance/define-governance-policies/index.md)
- [List bundles](/6.3/api-reference/bundles/list-bundles.md)
