Skip to content
GitHub

Stop a build. A build that has not started is cancelled at once; a running one is stopped by deleting its Job, and ends `cancelled` once the Job is gone — or `succeeded` if its output was already pushed and verifies.

POST
/api/v1/projects/{project}/environments/{environment}/apps/{app}/builds/{build}/cancel
curl --request POST \
--url https://example.com/api/v1/projects/example/environments/example/apps/example/builds/example/cancel
project
required
string

Project name

environment
required
string

Environment short name

app
required
string

App name

build
required
string

Build id

The stop was asked; poll the build

Media typeapplication/json
object
id
required
string
attempt
required

1 for the first attempt; an infrastructure retry is the next one.

integer format: int32
repository
required
string
branch
required
string
commit
required
string
strategy
required

auto, dockerfile or railpack, as configured.

string
phase
required

queued, blocked, preparing, running, publishing, verifyingOutput, cancelRequested, cancelling, succeeded, failed or cancelled.

string
blockedReason
string | null
failure

BuildError, OutOfMemory, DiskFull, DeadlineExceeded, LostWorker, SourceUnavailable, OutputRejected, …

string | null
failureDetail
string | null
image

repository@digest, once the registry confirmed it.

string | null
release
string | null
deployment
string | null
deployDecision

deployed, or why the build did not deploy (StaleSource, BuildConfigChanged, NotAutomatic, …).

string | null
cancelRequested
required
boolean
createdAt
required
integer format: int64
startedAt
integer | null format: int64
finishedAt
integer | null format: int64
stages

The stages in order, once the build reported them.

Array<object>
object
name
required
string
Allowed values: clone plan build scan push deploy
status
required
string
Allowed values: pending running succeeded failed skipped
startedAt
integer | null format: int64
finishedAt
integer | null format: int64
detail
string | null
Example
{
"stages": [
{
"name": "clone",
"status": "pending"
}
]
}
Media typeapplication/json

Problem Details body.

object
code
required

Stable machine-readable code, e.g. forbidden.

string
title
required

Short human readable title.

string
status
required

HTTP status.

integer format: int32
detail

Details, if safe to expose.

string | null
Example
{
"code": "forbidden"
}
Media typeapplication/json

Problem Details body.

object
code
required

Stable machine-readable code, e.g. forbidden.

string
title
required

Short human readable title.

string
status
required

HTTP status.

integer format: int32
detail

Details, if safe to expose.

string | null
Example
{
"code": "forbidden"
}

The build already finished

Media typeapplication/json

Problem Details body.

object
code
required

Stable machine-readable code, e.g. forbidden.

string
title
required

Short human readable title.

string
status
required

HTTP status.

integer format: int32
detail

Details, if safe to expose.

string | null
Example
{
"code": "forbidden"
}