Skip to main content

Restore Version

Page Outline

Restores a previous model version as the active configuration baseline, creating a new training entry point from the selected version's hyperparameters and config without modifying the version history.

Base Path: /api/v1/models

Method: POST

Path: /{model_id}/versions/{version_id}/restore

Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)

Path Parameters

ParameterTypeDescription
model_idstringUnique identifier of the parent model
version_idstringUnique identifier of the version to restore from

Behavior

  • "Restore" copies the hyperparameters, config, and algorithm of the selected version into the model's active configuration — it does not roll back the database record or alter the promoted version.
  • The caller can then trigger a new training run using the restored configuration via the Start Training endpoint.
  • Version history is preserved; the restore action does not delete newer versions.
  • An audit log entry is written with action model.version_restored, referencing the source version_id.
  • Returns HTTP 404 if the version does not exist under the given model.

Response

Returns the model's current configuration object after the restore is applied.

{
"model_id": "mdl-7f3a19bc",
"restored_from_version": "ver-001",
"active_config": {
"algorithm": "xgboost",
"hyperparameters": {
"n_estimators": 200,
"max_depth": 6,
"learning_rate": 0.05
}
},
"restored_at": "2026-03-13T16:15:00Z"
}