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.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/builds/example/cancel';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/example/environments/example/apps/example/builds/example/cancelParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
App name
Build id
Responses
Section titled “Responses”The stop was asked; poll the build
object
1 for the first attempt; an infrastructure retry is the next one.
auto, dockerfile or railpack, as configured.
queued, blocked, preparing, running, publishing,
verifyingOutput, cancelRequested, cancelling, succeeded,
failed or cancelled.
BuildError, OutOfMemory, DiskFull, DeadlineExceeded,
LostWorker, SourceUnavailable, OutputRejected, …
repository@digest, once the registry confirmed it.
deployed, or why the build did not deploy (StaleSource,
BuildConfigChanged, NotAutomatic, …).
The stages in order, once the build reported them.
object
Example
{ "stages": [ { "name": "clone", "status": "pending" } ]}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}The build already finished
Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}