Skip to main content

Update Model

Page Outline

Partially updates the metadata or configuration of an existing model. Only fields included in the request body are modified; all other fields remain unchanged.

Base Path: /api/v1/models

Method: PATCH

Path: /{model_id}

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

Path Parameters

ParameterTypeDescription
model_idstringUnique identifier of the model to update

Request Body

All fields are optional. Only provided fields will be updated.

{
"name": "Churn Predictor v2",
"description": "Updated description with improved feature set.",
"tags": ["churn", "production", "v2"],
"config": {
"algorithm": "lightgbm",
"target_column": "churned"
}
}
FieldTypeDescription
namestringNew model name (must remain unique within org)
descriptionstringUpdated description
tagsstring[]Replaces the entire tags array
configobjectShallow merge applied over existing config

Behavior

  • Uses partial update (PATCH) semantics — unspecified fields are not cleared.
  • config is shallow-merged: top-level keys in the request body overwrite existing keys; nested objects are replaced, not merged.
  • model_type and task_type are immutable after creation; supplying them returns HTTP 422 Unprocessable Entity.
  • Updates are blocked while the model is in training status; returns HTTP 409 Conflict.
  • An audit log entry is written with action model.updated, recording which fields changed and their previous values.

Response

Returns the updated Model object with the same structure as Get Model.