Skip to main content
PUT
/
api
/
models
/
{model}
/
deployments
/
{name}
/
allowed_roles
Set the Keycloak roles allowed to invoke or manage this deployment
curl --request PUT \
  --url https://api.example.com/api/models/{model}/deployments/{name}/allowed_roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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
name
string
required

Body

application/json

Replace the deployment's allow-list of Keycloak roles.

allowed_roles
string[]

Empty list locks the proxy to 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
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