`POST /api/apps/{id}/builds` -- enqueue a build of the App's current source for the WebIde live-preview (ADR 0030 UX3-A). Idempotent on the source hash: an unchanged source returns the existing (possibly succeeded) build. Returns the build row so the client can start polling immediately.
const url = 'https://example.com/api/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/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/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/buildsPOST /api/apps/{id}/builds – enqueue a build of the App’s current source
for the WebIde live-preview (ADR 0030 UX3-A). Idempotent on the source hash:
an unchanged source returns the existing (possibly succeeded) build. Returns
the build row so the client can start polling immediately.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”OK
One build of an App’s source folder (ADR 0030 W3-1). The status column is
stored as TEXT (matching every other status-bearing row in this codebase,
e.g. AppDeployment / Run); use [AppBuildStatus] to parse / format it
in a typed way. claimed_by is the runner id that took the build off the
queue (no FK – runners are not a workspace-scoped table).
object
SHA of the produced artifact, set once status = 'succeeded'.
Why a queued build is waiting (AUD-PERF-015 / SCG-133): the build-minutes
quota refusal the claim path stamped when it skipped this build’s workspace.
None when nothing blocks it; the claim that takes the build clears it.
Runner id that claimed the build off the queue. None while queued.
Populated when status = 'failed'.
Content hash over the App’s source folder. UNIQUE per App, so a re-build of identical source resolves to the existing row instead of enqueueing.
End-to-end build duration in whole seconds, stamped on completion.
Example generated
{ "app_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "artifact_sha": "example", "blocked_reason": "example", "claimed_at": "2026-04-15T12:00:00Z", "claimed_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "completed_at": "2026-04-15T12:00:00Z", "created_at": "2026-04-15T12:00:00Z", "error_message": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_sha256": "example", "status": "example", "wall_clock_secs": 1, "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}