Skip to main content
PATCH
/
v3
/
models
/
{model_id}
curl — schema + spec update
# Requires `jq`. PATCH replaces nested objects wholesale, so each
# step reads the current value first and merges before sending.

# 1. Retrieve the current model.
current=$(curl -sS "$FIDDLER_URL/v3/models/$MODEL_ID" \
  -H "Authorization: Bearer $FIDDLER_TOKEN")

# 2. PATCH the schema with existing columns + new column.
new_schema=$(echo "$current" | jq '.data.schema
  | .columns += [{"name": "new_feature", "data_type": "float"}]')
curl -sS -X PATCH "$FIDDLER_URL/v3/models/$MODEL_ID" \
  -H "Authorization: Bearer $FIDDLER_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --argjson s "$new_schema" '{schema: $s}')"

# 3. PATCH the spec with the existing roles preserved and the
#    new column appended to `inputs`. Without this step the new
#    column will not appear in the UI beyond the raw events
#    table; without preserving the other arrays, existing
#    outputs / targets / decisions / metadata / custom_features
#    would be wiped.
new_spec=$(echo "$current" | jq '.data.spec
  | .inputs += ["new_feature"]')
curl -sS -X PATCH "$FIDDLER_URL/v3/models/$MODEL_ID" \
  -H "Authorization: Bearer $FIDDLER_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --argjson s "$new_spec" '{spec: $s}')"
{
  "api_version": "3.0",
  "kind": "NORMAL",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "version": "v1",
    "organization": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "project": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "deleted_at": "2023-11-07T05:31:56Z",
    "algorithm": "<string>",
    "framework": "<string>",
    "created_by": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "jsmith@example.com",
      "full_name": "<string>"
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "owner": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "jsmith@example.com",
      "full_name": "<string>"
    },
    "deployment_date": "2023-11-07T05:31:56Z",
    "updated_by": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "jsmith@example.com",
      "full_name": "<string>"
    },
    "task_params": {
      "binary_classification_threshold": 123,
      "target_class_order": [
        "<string>"
      ],
      "group_by": "<string>",
      "top_k": 123,
      "class_weights": [
        123
      ],
      "weighted_ref_histograms": true
    },
    "schema": {
      "schema_version": 1,
      "columns": [
        {
          "name": "<string>",
          "id": "<string>",
          "min": 123,
          "max": 123,
          "categories": [
            "<string>"
          ],
          "bins": [
            123
          ],
          "replace_with_nulls": [
            "<string>"
          ],
          "n_dimensions": 123
        }
      ]
    },
    "spec": {
      "schema_version": 1,
      "inputs": [
        "<string>"
      ],
      "outputs": [
        "<string>"
      ],
      "targets": [
        "<string>"
      ],
      "decisions": [
        "<string>"
      ],
      "metadata": [
        "<string>"
      ],
      "custom_features": [
        {
          "name": "<string>",
          "columns": [
            "<string>"
          ],
          "centroids": [
            123
          ],
          "tf_idf": [
            {}
          ],
          "n_clusters": 123,
          "monitor_components": true
        }
      ]
    },
    "event_id_col": "<string>",
    "event_ts_col": "<string>",
    "event_ts_format": "<string>",
    "xai_params": {
      "custom_explain_methods": [
        "<string>"
      ],
      "default_explain_method": "<string>"
    },
    "artifact_files": [
      {
        "name": "<string>",
        "size": 123,
        "modified": "2023-11-07T05:31:56Z"
      }
    ],
    "is_binary_ranking_model": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

model_id
string<uuid>
required

model id path parameter

Body

application/json
status
enum<string>
default:LIVE
Available options:
LIVE,
DRAFT
version
string
default:v1

Version of the model

Required string length: 1 - 64
input_type
enum<string>

Enumeration of different model input types.

Available options:
text,
structured
task
enum<string>

Enumeration of different types of model tasks.

Available options:
binary_classification,
multiclass_classification,
regression,
ranking,
not_set,
llm
schema
object

Model schema with the details of each column

spec
object
task_params
object
xai_params
object

XAI parameters set for a model

description
string | null

Description of the model

owner_id
string | null

User ID for the owner of the model

deployment_date
string<date-time> | null

Date the model was deployed on

algorithm
string | null

Model algorithm

framework
string | null

A string providing information about the software library and version used to train and run this model

event_id_col
string | null

Event id column to be found in published data for the model

event_ts_col
string | null

Timestamp column to be found in published data for the model

event_ts_format
string | null

Format of the timestamp like datetime, epoch time etc.

Response

Updated model JSON response

Response object for standard API responses.

api_version
enum<string>
default:3.0

API version.

Available options:
2.0,
3.0
kind
enum<string>
default:NORMAL

Type of response, indicating a normal response.

Available options:
NORMAL
data
object

Model fields JSON