# Model replacement
URL: https://docs.datarobot.com/en/docs/api/reference/public-api/deployment_model_replacement.html

> Use the endpoints described below to manage deployment model replacement.

# Model replacement

Use the endpoints described below to manage deployment model replacement.

## Model Replacement by deployment ID

Operation path: `PATCH /api/v2/deployments/{deploymentId}/model/`

Authentication requirements: `BearerAuth`

Replace the model used to make predictions for the deployment.
A validation process will be performed to make sure the new model is eligible as a replacement. If the validation fails, the model replacement will not occur.The Model Replacement Validation endpoint can be used to confirm the new model is eligible as a replacement.

### Body parameter

```
{
  "properties": {
    "modelId": {
      "description": "ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided.",
      "type": "string",
      "x-versiondeprecated": "v2.33"
    },
    "modelPackageId": {
      "description": "ID of the model package used to replace deployment's champion model. Required if modelId is not provided.",
      "type": "string",
      "x-versionadded": "v2.21"
    },
    "reason": {
      "description": "Reason for the model replacement.",
      "enum": [
        "ACCURACY",
        "DATA_DRIFT",
        "ERRORS",
        "SCHEDULED_REFRESH",
        "SCORING_SPEED",
        "DEPRECATION",
        "OTHER"
      ],
      "type": "string"
    },
    "runtimeParameterValues": {
      "description": "Inject values into a model at runtime. The fieldName must match a fieldName defined in the model package. This list is merged with any existing runtime values set through the deployed model package.\n                    <blockquote>This property is gated behind the feature flags **`['CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT']`**.\n                    To enable this feature, you can contact your DataRobot representative or administrator.\n                    </blockquote>",
      "feature_flags": [
        {
          "description": "Enables the ability to edit Custom Model Runtime-Parameters (and replica and resource bundle settings) directly from the Deployment info page. Edited values are local to a given Deployment and do not affect the runtime of any current or future Deployments of the same Model Package.",
          "enabled_by_default": true,
          "maturity": "PUBLIC_PREVIEW",
          "name": "CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT"
        }
      ],
      "public_preview": true,
      "type": "string",
      "x-datarobot-public-preview": true,
      "x-datarobot-required-feature-flags": [
        {
          "description": "Enables the ability to edit Custom Model Runtime-Parameters (and replica and resource bundle settings) directly from the Deployment info page. Edited values are local to a given Deployment and do not affect the runtime of any current or future Deployments of the same Model Package.",
          "enabled_by_default": true,
          "maturity": "PUBLIC_PREVIEW",
          "name": "CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT"
        }
      ],
      "x-versionadded": "v2.35"
    }
  },
  "required": [
    "reason"
  ],
  "type": "object"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| deploymentId | path | string | true | Unique identifier of the deployment. |
| body | body | ModelReplacementSubmission | false | none |

### Example responses

> 202 Response

```
{
  "properties": {
    "checks": {
      "description": "A more granular explanation of why the replacement model was eligible or ineligible.",
      "properties": {
        "combinedModelSegments": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "containsTrackedSegmentAttributes": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "driftTracking": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "featureDataTypes": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "features": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "humilityRules": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "modelCanBeDeployed": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "modelStatus": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "notCurrentModel": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "permission": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "predictionIntervals": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "predictionReady": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "seriesType": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "supported": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "target": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "targetClasses": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "targetType": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "timeSeriesCompatibility": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "validChallenger": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        }
      },
      "type": "object"
    },
    "message": {
      "description": "Message of the overall validation check.",
      "type": "string"
    },
    "status": {
      "description": "Status of the overall validation check.",
      "enum": [
        "failing",
        "passing",
        "warning"
      ],
      "type": "string"
    }
  },
  "required": [
    "checks",
    "message",
    "status"
  ],
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 202 | Accepted | Job submitted. See Location header. | ModelReplacementValidationResponse |

### Response Headers

| Status | Header | Type | Format | Description |
| --- | --- | --- | --- | --- |
| 202 | Location | string |  | A url that can be polled to check the status. |

## Model Replacement Validation by deployment ID

Operation path: `POST /api/v2/deployments/{deploymentId}/model/validation/`

Authentication requirements: `BearerAuth`

Validate that a model can be used to replace the current model of the deployment.

### Body parameter

```
{
  "properties": {
    "modelId": {
      "description": "ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided.",
      "type": "string",
      "x-versiondeprecated": "v2.33"
    },
    "modelPackageId": {
      "description": "ID of the model package used to replace deployment's champion model. Required if modelId is not provided.",
      "type": "string",
      "x-versionadded": "v2.21"
    }
  },
  "type": "object"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| deploymentId | path | string | true | Unique identifier of the deployment. |
| body | body | ModelReplacementValidationRequest | false | none |

### Example responses

> 200 Response

```
{
  "properties": {
    "checks": {
      "description": "A more granular explanation of why the replacement model was eligible or ineligible.",
      "properties": {
        "combinedModelSegments": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "containsTrackedSegmentAttributes": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "driftTracking": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "featureDataTypes": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "features": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "humilityRules": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "modelCanBeDeployed": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "modelStatus": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "notCurrentModel": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "permission": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "predictionIntervals": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "predictionReady": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "seriesType": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "supported": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "target": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "targetClasses": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "targetType": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "timeSeriesCompatibility": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "validChallenger": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        }
      },
      "type": "object"
    },
    "message": {
      "description": "Message of the overall validation check.",
      "type": "string"
    },
    "status": {
      "description": "Status of the overall validation check.",
      "enum": [
        "failing",
        "passing",
        "warning"
      ],
      "type": "string"
    }
  },
  "required": [
    "checks",
    "message",
    "status"
  ],
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | ModelReplacementValidationResponse |

# Schemas

## ModelReplacementSubmission

```
{
  "properties": {
    "modelId": {
      "description": "ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided.",
      "type": "string",
      "x-versiondeprecated": "v2.33"
    },
    "modelPackageId": {
      "description": "ID of the model package used to replace deployment's champion model. Required if modelId is not provided.",
      "type": "string",
      "x-versionadded": "v2.21"
    },
    "reason": {
      "description": "Reason for the model replacement.",
      "enum": [
        "ACCURACY",
        "DATA_DRIFT",
        "ERRORS",
        "SCHEDULED_REFRESH",
        "SCORING_SPEED",
        "DEPRECATION",
        "OTHER"
      ],
      "type": "string"
    },
    "runtimeParameterValues": {
      "description": "Inject values into a model at runtime. The fieldName must match a fieldName defined in the model package. This list is merged with any existing runtime values set through the deployed model package.\n                    <blockquote>This property is gated behind the feature flags **`['CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT']`**.\n                    To enable this feature, you can contact your DataRobot representative or administrator.\n                    </blockquote>",
      "feature_flags": [
        {
          "description": "Enables the ability to edit Custom Model Runtime-Parameters (and replica and resource bundle settings) directly from the Deployment info page. Edited values are local to a given Deployment and do not affect the runtime of any current or future Deployments of the same Model Package.",
          "enabled_by_default": true,
          "maturity": "PUBLIC_PREVIEW",
          "name": "CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT"
        }
      ],
      "public_preview": true,
      "type": "string",
      "x-datarobot-public-preview": true,
      "x-datarobot-required-feature-flags": [
        {
          "description": "Enables the ability to edit Custom Model Runtime-Parameters (and replica and resource bundle settings) directly from the Deployment info page. Edited values are local to a given Deployment and do not affect the runtime of any current or future Deployments of the same Model Package.",
          "enabled_by_default": true,
          "maturity": "PUBLIC_PREVIEW",
          "name": "CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT"
        }
      ],
      "x-versionadded": "v2.35"
    }
  },
  "required": [
    "reason"
  ],
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| modelId | string | false |  | ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided. |
| modelPackageId | string | false |  | ID of the model package used to replace deployment's champion model. Required if modelId is not provided. |
| reason | string | true |  | Reason for the model replacement. |
| runtimeParameterValues | string | false |  | Inject values into a model at runtime. The fieldName must match a fieldName defined in the model package. This list is merged with any existing runtime values set through the deployed model package. This property is gated behind the feature flags ['CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT']. To enable this feature, you can contact your DataRobot representative or administrator. |

### Enumerated Values

| Property | Value |
| --- | --- |
| reason | [ACCURACY, DATA_DRIFT, ERRORS, SCHEDULED_REFRESH, SCORING_SPEED, DEPRECATION, OTHER] |

## ModelReplacementValidationRequest

```
{
  "properties": {
    "modelId": {
      "description": "ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided.",
      "type": "string",
      "x-versiondeprecated": "v2.33"
    },
    "modelPackageId": {
      "description": "ID of the model package used to replace deployment's champion model. Required if modelId is not provided.",
      "type": "string",
      "x-versionadded": "v2.21"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| modelId | string | false |  | ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided. |
| modelPackageId | string | false |  | ID of the model package used to replace deployment's champion model. Required if modelId is not provided. |

## ModelReplacementValidationResponse

```
{
  "properties": {
    "checks": {
      "description": "A more granular explanation of why the replacement model was eligible or ineligible.",
      "properties": {
        "combinedModelSegments": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "containsTrackedSegmentAttributes": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "driftTracking": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "featureDataTypes": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "features": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "humilityRules": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "modelCanBeDeployed": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "modelStatus": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "notCurrentModel": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "permission": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "predictionIntervals": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "predictionReady": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "seriesType": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "supported": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "target": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "targetClasses": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "targetType": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "timeSeriesCompatibility": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        },
        "validChallenger": {
          "description": "Whether the replacement model has the same target name as the current model.",
          "properties": {
            "message": {
              "description": "Message of the validation check.",
              "type": "string"
            },
            "status": {
              "description": "Status of the validation check.",
              "enum": [
                "failing",
                "passing",
                "warning"
              ],
              "type": "string"
            }
          },
          "required": [
            "message",
            "status"
          ],
          "type": "object"
        }
      },
      "type": "object"
    },
    "message": {
      "description": "Message of the overall validation check.",
      "type": "string"
    },
    "status": {
      "description": "Status of the overall validation check.",
      "enum": [
        "failing",
        "passing",
        "warning"
      ],
      "type": "string"
    }
  },
  "required": [
    "checks",
    "message",
    "status"
  ],
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| checks | ValidationChecks | true |  | A more granular explanation of why the replacement model was eligible or ineligible. |
| message | string | true |  | Message of the overall validation check. |
| status | string | true |  | Status of the overall validation check. |

### Enumerated Values

| Property | Value |
| --- | --- |
| status | [failing, passing, warning] |

## ValidationCheck

```
{
  "description": "Whether the replacement model has the same target name as the current model.",
  "properties": {
    "message": {
      "description": "Message of the validation check.",
      "type": "string"
    },
    "status": {
      "description": "Status of the validation check.",
      "enum": [
        "failing",
        "passing",
        "warning"
      ],
      "type": "string"
    }
  },
  "required": [
    "message",
    "status"
  ],
  "type": "object"
}
```

Whether the replacement model has the same target name as the current model.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| message | string | true |  | Message of the validation check. |
| status | string | true |  | Status of the validation check. |

### Enumerated Values

| Property | Value |
| --- | --- |
| status | [failing, passing, warning] |

## ValidationChecks

```
{
  "description": "A more granular explanation of why the replacement model was eligible or ineligible.",
  "properties": {
    "combinedModelSegments": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "containsTrackedSegmentAttributes": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "driftTracking": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "featureDataTypes": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "features": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "humilityRules": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "modelCanBeDeployed": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "modelStatus": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "notCurrentModel": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "permission": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "predictionIntervals": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "predictionReady": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "seriesType": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "supported": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "target": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "targetClasses": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "targetType": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "timeSeriesCompatibility": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    },
    "validChallenger": {
      "description": "Whether the replacement model has the same target name as the current model.",
      "properties": {
        "message": {
          "description": "Message of the validation check.",
          "type": "string"
        },
        "status": {
          "description": "Status of the validation check.",
          "enum": [
            "failing",
            "passing",
            "warning"
          ],
          "type": "string"
        }
      },
      "required": [
        "message",
        "status"
      ],
      "type": "object"
    }
  },
  "type": "object"
}
```

A more granular explanation of why the replacement model was eligible or ineligible.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| combinedModelSegments | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| containsTrackedSegmentAttributes | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| driftTracking | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| featureDataTypes | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| features | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| humilityRules | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| modelCanBeDeployed | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| modelStatus | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| notCurrentModel | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| permission | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| predictionIntervals | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| predictionReady | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| seriesType | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| supported | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| target | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| targetClasses | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| targetType | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| timeSeriesCompatibility | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |
| validChallenger | ValidationCheck | false |  | Whether the replacement model has the same target name as the current model. |

---
