curl --request POST \
--url https://api.baseten.co/v1/chains/{chain_id}/environments/{env_name}/promote \
--header "Authorization: Api-Key $BASETEN_API_KEY" \
--data '{
  "scale_down_previous_deployment": true,
  "deployment_id": null
}'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "chain_id": "<string>",
  "environment": "<string>",
  "chainlets": [
    {
      "id": "<string>",
      "name": "<string>",
      "autoscaling_settings": {
        "min_replica": 123,
        "max_replica": 123,
        "autoscaling_window": 123,
        "scale_down_delay": 123,
        "concurrency_target": 123
      },
      "instance_type_name": "<string>",
      "active_replica_count": 123,
      "status": "BUILDING"
    }
  ],
  "status": "BUILDING"
}

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

chain_id
string
required
env_name
string
required

Body

application/json

A request to promote a deployment to a environment.

deployment_id
string
required

The id of the chain deployment to promote

scale_down_previous_deployment
boolean
default:true

Whether to scale down the previous deployment after promoting

Example:

true

Response

200 - application/json

A deployment of a chain.

id
string
required

Unique identifier of the chain deployment

created_at
string
required

Time the chain deployment was created in ISO 8601 format

chain_id
string
required

Unique identifier of the chain

environment
string | null
required

Environment the chain deployment is deployed in

chainlets
object[]
required

Chainlets in the chain deployment

A chainlet in a chain deployment.

status
enum<string>
required

Status of the chain deployment

Available options:
BUILDING,
DEPLOYING,
DEPLOY_FAILED,
LOADING_MODEL,
ACTIVE,
UNHEALTHY,
BUILD_FAILED,
BUILD_STOPPED,
DEACTIVATING,
INACTIVE,
FAILED,
UPDATING,
SCALED_TO_ZERO,
WAKING_UP