Skip to main content
PATCH
/
v1
/
models
/
{model_id}
/
environments
/
{env_name}
cURL
curl --request PATCH \
--url https://api.baseten.co/v1/models/{model_id}/environments/{env_name} \
--header "Authorization: Api-Key $BASETEN_API_KEY" \
--data '{
  "autoscaling_settings": {
    "autoscaling_window": 800,
    "concurrency_target": 3,
    "max_replica": 2,
    "min_replica": 1,
    "scale_down_delay": 60,
    "target_utilization_percentage": null
  },
  "promotion_settings": {
    "ramp_up_duration_seconds": 600,
    "ramp_up_while_promoting": true,
    "redeploy_on_promotion": true,
    "rolling_deploy": null
  }
}'
{
  "status": "ACCEPTED",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

You must specify the scheme 'Api-Key' in the Authorization header. For example, Authorization: Api-Key <Your_Api_Key>

Path Parameters

model_id
string
required
env_name
string
required

Body

application/json

A request to update an environment.

autoscaling_settings
UpdateAutoscalingSettingsV1 · object

Autoscaling settings for the environment

Example:
{
"autoscaling_window": 800,
"concurrency_target": 3,
"max_replica": 2,
"min_replica": 1,
"scale_down_delay": 60,
"target_utilization_percentage": null
}
promotion_settings
UpdatePromotionSettingsV1 · object

Promotion settings for the environment

Example:
{
"ramp_up_duration_seconds": 600,
"ramp_up_while_promoting": true,
"redeploy_on_promotion": true,
"rolling_deploy": null
}

Response

200 - application/json

The response to a request to update autoscaling settings.

The response to a request to update autoscaling settings.

status
enum<string>
required

Status of the request to update autoscaling settings

Available options:
ACCEPTED,
QUEUED,
UNCHANGED
message
string
required

A message describing the status of the request to update autoscaling settings