Build the source's branch head now: the same as a source sync.
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/builds';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/buildsParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Environment short name
App name
Responses
Section titled “Responses”The sync was queued
A build of the source head was asked for: the head is read, then built unless it is already.
object
The sync that reads the head and queues the build.
The newest build, when one exists.
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
{ "build": { "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 app has no Git source
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"}