Skip to main content
POST
/
api
/
models
/
{model}
/
deployments
Create a deployment for a model
curl --request POST \
  --url https://api.example.com/api/models/{model}/deployments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "model": {
    "model_name": "<string>",
    "model_version": "<string>",
    "model_alias": "<string>"
  },
  "source": {
    "schema": "<string>",
    "table": "<string>",
    "catalog": "iceberg",
    "filter_sql": "<string>",
    "snapshot_id": 123
  },
  "target": {
    "schema": "<string>",
    "table": "<string>",
    "catalog": "iceberg"
  },
  "entity_columns": [
    "<string>"
  ],
  "domain": "<string>",
  "owner": "<string>",
  "type": "batch",
  "schedule": "<string>",
  "rerun_behavior": "overwrite_partition",
  "partition_column": "scored_at",
  "trigger_now": false,
  "allowed_roles": [
    "<string>"
  ]
}
'
{
  "deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "domain": "<string>",
  "owner": "<string>",
  "model": {
    "model_name": "<string>",
    "model_version": "<string>",
    "model_alias": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "resolved_model_version": "<string>",
  "dag_id": "<string>",
  "dag_s3_uri": "<string>",
  "schedule": "<string>",
  "last_run": {
    "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "airflow_run_id": "<string>",
    "rows_scored": 123,
    "started_at": "2023-11-07T05:31:56Z",
    "finished_at": "2023-11-07T05:31:56Z"
  },
  "service_url": "<string>",
  "replica_count": 123,
  "ready_replicas": 123,
  "allowed_roles": [
    "<string>"
  ],
  "error_message": "<string>",
  "stopped_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

model
string
required

MLflow registered model name.

Body

application/json
name
string
required

Deployment name. Use lowercase letters, digits, and hyphens only. Must start and end with an alphanumeric character, with a maximum of 63 characters. Unique per registered model.

model
ModelReference · object
required

A registered MLflow model with either a version number or an alias.

Provide exactly one of model_version or model_alias. A version number deploys a specific model release. An alias resolves to a concrete version at deployment creation time.

source
SourceTable · object
required

Iceberg table the batch scorer reads from.

target
TargetTable · object
required

Iceberg table the batch scorer writes predictions to.

entity_columns
string[]
required

Columns from the source carried forward into the predictions table.

Minimum array length: 1
domain
string
required
owner
string
required
type
string
default:batch
Allowed value: "batch"
schedule
string | null

Cron expression. None = manual-trigger only.

rerun_behavior
enum<string>
default:overwrite_partition
Available options:
overwrite_partition,
append_dedup
partition_column
string
default:scored_at

Partition column for overwrite_partition mode.

trigger_now
boolean
default:false
allowed_roles
string[] | null

Keycloak roles that can invoke or manage this deployment via a user PSK. An empty or unset list restricts access to the platform PSK only.

Response

Successful Response

deployment_id
string<uuid>
required
name
string
required
type
enum<string>
required
Available options:
batch,
online
status
enum<string>
required
Available options:
pending,
deploying,
active,
failed,
stopped,
archived
domain
string
required
owner
string
required
model
ModelReference · object
required

A registered MLflow model with either a version number or an alias.

Provide exactly one of model_version or model_alias. A version number deploys a specific model release. An alias resolves to a concrete version at deployment creation time.

created_at
string<date-time>
required
updated_at
string<date-time>
required
resolved_model_version
string | null

The model version this deployment currently uses. When the deployment references an alias, this shows the resolved version number.

dag_id
string | null
dag_s3_uri
string | null
schedule
string | null
last_run
DeploymentRunSummary · object | null
service_url
string | null
replica_count
integer | null
ready_replicas
integer | null
allowed_roles
string[] | null
error_message
string | null
stopped_at
string<date-time> | null