Skip to content

Pull the latest code, build and restart

POST
/deployments/{deployment_id}/redeploy
curl --request POST \
--url https://api.global.stillbox.example/v1/deployments/example/redeploy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "build": "example", "start": "example", "port": 1, "health_path": "example", "pull": true }'

Fields sent replace the deployment’s. The running service keeps serving until the new build succeeds; if it fails, the old one stays and the status says why.

deployment_id
required
string
Media typeapplication/json
object
build
string
start
string
port
integer
>= 1024 <= 65535
health_path
string
pull

Pull the branch’s latest commits first

boolean
default: true

The redeploy started; the status follows it

Media typeapplication/json
object
state
required
string
Allowed values: waiting building starting running crashed failed stopped
version
required
integer
commit
string
restarts
required
integer
started_at
string format: date-time
error
string
building

A redeploy is building while the previous version keeps serving

boolean

Example

{
"state": "waiting"
}

The request is invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No such sandbox in your organization (or no such file)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The sandbox isn’t running, or its server is unreachable right now

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}