Update the fields of a model
Update the fields of a model.
Schema and spec consistency. This endpoint does not enforce
consistency between the model schema (the list of columns) and
the model spec (which assigns each column a role such as
inputs, outputs, targets, decisions, metadata, or
custom_features). If you add a column to schema without also
adding it to the appropriate spec array, the column will be
ingested into the raw events table but will not appear anywhere
else in the Fiddler UI.
PATCH replaces nested objects wholesale. When you PATCH the
spec (or schema) field, the request body replaces the entire
nested object — any role array you omit (inputs, outputs,
targets, decisions, metadata, custom_features) is reset
to empty on the server. Always read the current model first and
merge your additions into the existing arrays before sending the
PATCH.
To add columns safely, follow the multi-step sequence shown in the code samples on the right:
GET /v3/models/{model_id}— retrieve the currentschemaandspec.PATCH /v3/models/{model_id}with an updatedschemacontaining the existing columns plus the new columns.PATCH /v3/models/{model_id}with an updatedspecthat preserves every existing role array and adds the new columns to the appropriate one.
The Fiddler Python SDK and the Fiddler UI enforce this consistency automatically; this note applies to direct REST API integrations.