Cancel a build
A queued build becomes canceled at once; a running one is asked to stop and ends as canceled shortly. A build
that already finished is returned unchanged (so this is safe to call after the fact).
/v1/builds/{id}AuthorizationBearer token · headerrequiredA team API key, sbk_..., from Settings, API keys.
x-api-keyAPI key · headerrequiredThe same key, in a header of its own.
idstring<uuid>requiredA build id (a UUID, from POST /v1/apps/{project}/builds).
The build after the request.
idstring<uuid>requiredprojectstringrequiredstatestringrequiredqueuedbuildingreadyfailedcanceledcachedbooleanTrue when the result came from an identical earlier build.
positioninteger | nullPlace in the queue while queued.
waitingstring | nullWhy a queued build is held back (for example waiting for memory). Not a failure.
supersededbooleanA newer deploy of the project overtook this build; it did not touch the app.
expected_sinteger | nullEstimated seconds to finish. An estimate, not a promise.
estimated_start_sinteger | nullerrorobject | nullSet when failed or canceled. code is one of prepare_failed, prepare_timeout, compile_failed, compile_timeout, abi_rejected, input_invalid, timeout, resource_exceeded, canceled, builder_error, apply_failed, queue_timeout, builder_lost; message is the build output's reason.
Show propertiesHide properties
codestringmessagestringmodule_sha256string | nullThe module this build produced, once ready.
record_generationinteger | nullThe app generation the build wrote, once ready. Wait for this to be applied.
hostsstring[]created_byobject | nullShow propertiesHide properties
namestringviastring | nulltriggerstringWhat started it: cli, git, dashboard or operator.
queued_atstring<date-time>started_atstring<date-time> | nullfinished_atstring<date-time> | nullstatsobjectShow propertiesHide properties
wall_msinteger | nullcpu_msinteger | nullpeak_memory_bytesinteger | nullmemory_cap_bytesinteger | nullmodule_bytesinteger | nullNo key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key lacks a grant (reason: forbidden, need: "<resource>:<action>").
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredforbiddenneedstringrequiredThe grant, as <resource>:<action>, for example app:write.
No such app, build, secret, manifest or claim in this team (another team's resource looks the same).
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key is over its requests a minute (600, or 2,000 with app:write; reason: key-rate-limited, retry_after_s, Retry-After). Wait that long and retry.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredkey-rate-limitedretry_after_sintegerrequiredSeconds to wait; also the Retry-After header.