Versions and builds
List an app's versions, follow the builds that produced them, and remove the ones no longer needed.
Introduction
Every change to an app records a version, including a change that only touches configuration. A version is what a deploy activates, and rolling back is activating an earlier one.
A build is the work that produces a version's image. A version names the build it came from in buildId, and a version created by a configuration update carries the previous image, and therefore the previous build, forward. That is why an app can end up with more versions than builds.
Deploying a version is POST /v1/apps/{appId}/deploy, documented with the other app operations. This page covers reading and removing them.
List versions
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps.
Response
nextCursor
stringnullableCursor for the next page. Null when there are no more items.
data
object[]requiredArray items9 properties each
id
string (uuid)requiredUUID v4
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps: it cannot be changed after creation, and it becomes available again once the app it named reaches
deleted.
versionNumber
integerrequiredint32Monotonically increasing per app.
buildId
string (uuid)nullableUUID v4The build that produced this version's image. Both source types build. A
codesource bakes an image around a submitted codebase, acontainersource builds the customer's own wrapper Dockerfile. A version created by an update carries the image, and therefore this build, forward.
gpuType
stringnullablemin: 1max: 64Preferred GPU type of this version, taken from the config snapshot.
author
objectnullableWho created this version: the authenticated user (JWT) or the API key.
displayNameis the name captured at write time.Properties3 properties
kind
stringrequiredWhether the actor is a user (JWT) or an API key.
Possible values2 values
id
string (uuid)requiredUUID v4
displayName
stringrequired
buildDurationMs
integernullableint64Wall-clock milliseconds of the named build (
completedAt - createdAton that build). Null while the build is running or when no completion time is available. Bytes and units are not included. This is a raw millisecond count.
changes
objectnullableStructured diff against the previous version. Null on version 1.
Properties5 properties
imageChanged
booleanrequiredTrue when this version names a different image than the previous one (
buildIdorimageRefchanged). False for a config-only update, which carries the image forward.
workerConfig
object[]
environmentVariables
objectKeys added, removed, or changed between consecutive versions. For environment variables,
changedis keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it ismountPath.changedis omitted on those two (a path either exists or does not).
endpoints
objectKeys added, removed, or changed between consecutive versions. For environment variables,
changedis keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it ismountPath.changedis omitted on those two (a path either exists or does not).
volumes
objectKeys added, removed, or changed between consecutive versions. For environment variables,
changedis keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it ismountPath.changedis omitted on those two (a path either exists or does not).
createdAt
string (date-time)requireddate-time
summary
objectrequiredCollection totals for a paged list. Independent of the page:
totalis the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row.Properties1 property
total
integerrequiredint64min: 0Number of items in the collection this page was drawn from.
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
503 | A required service is temporarily unavailable |
Get a version
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps.
versionNumber
integerrequiredint32
Response
id
string (uuid)requiredUUID v4
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps: it cannot be changed after creation, and it becomes available again once the app it named reaches
deleted.
versionNumber
integerrequiredint32Monotonically increasing per app.
buildId
string (uuid)nullableUUID v4The build that produced this version's image. Both source types build. A
codesource bakes an image around a submitted codebase, acontainersource builds the customer's own wrapper Dockerfile. A version created by an update carries the image, and therefore this build, forward.
gpuType
stringnullablemin: 1max: 64Preferred GPU type of this version, taken from the config snapshot.
author
objectnullableWho created this version: the authenticated user (JWT) or the API key.
displayNameis the name captured at write time.Properties3 properties
kind
stringrequiredWhether the actor is a user (JWT) or an API key.
Possible values2 values
id
string (uuid)requiredUUID v4
displayName
stringrequired
buildDurationMs
integernullableint64Wall-clock milliseconds of the named build (
completedAt - createdAton that build). Null while the build is running or when no completion time is available. Bytes and units are not included. This is a raw millisecond count.
changes
objectnullableStructured diff against the previous version. Null on version 1.
Properties5 properties
imageChanged
booleanrequiredTrue when this version names a different image than the previous one (
buildIdorimageRefchanged). False for a config-only update, which carries the image forward.
workerConfig
object[]
environmentVariables
objectKeys added, removed, or changed between consecutive versions. For environment variables,
changedis keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it ismountPath.changedis omitted on those two (a path either exists or does not).
endpoints
objectKeys added, removed, or changed between consecutive versions. For environment variables,
changedis keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it ismountPath.changedis omitted on those two (a path either exists or does not).
volumes
objectKeys added, removed, or changed between consecutive versions. For environment variables,
changedis keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it ismountPath.changedis omitted on those two (a path either exists or does not).
createdAt
string (date-time)requireddate-time
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
503 | A required service is temporarily unavailable |
Delete a version
Deletes an unused version while retaining its immutable history. Deleted versions are omitted from version lists, return 404 from version reads, and cannot be deployed. Returns 409 while the app is deleting, or when the version is active, is the app's only remaining version, has a non-stopped worker, or is targeted by a live rollout. Deleting an already deleted version returns 404. This operation does not remove the version's OCI image.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps.
versionNumber
integerrequiredint32
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
409 | Resource already exists or the request conflicts with its current state |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
503 | A required service is temporarily unavailable |
List builds
The summary counts the app's builds and its versions, whichever page you asked for, so the same two numbers come back on every cursor. A configuration-only update raises versions without raising total.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps.
Response
nextCursor
stringnullableCursor for the next page. Null when there are no more items.
data
object[]requiredArray items14 properties each
id
string (uuid)requiredUUID v4
appId
stringmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps: it cannot be changed after creation, and it becomes available again once the app it named reaches
deleted.
source
objectrequiredWhere a build's source came from:
codefor a customer code submission,containerfor a customer wrapper Dockerfile.repositoryandrevisionare not yet recorded (both sources are zip uploads) and will be added when the platform stores that provenance.Properties1 property
type
stringrequiredThe kind of source that produced this build:
codeorcontainer, straight from the build record. Build phases differ by kind, so clients must not assume a fixed phase list. Not modeled as an enum so adding a kind later does not churn the existing source-type constants this API shares.
triggeredBy
objectWho performed an action: the authenticated user (JWT) or the API key.
kindsays which, soid(that actor's UUID) is resolvable to the right thing.displayNameis its name captured at write time, so it renders as it was even if the user or key is later renamed. Used asBuild.triggeredByandVersion.author.Properties3 properties
kind
stringrequiredWhether the actor is a user (JWT) or an API key.
Possible values2 values
id
string (uuid)requiredUUID v4
displayName
stringrequired
status
stringrequiredBuild/validation lifecycle status.
Possible values5 values
versionId
string (uuid)nullableUUID v4The version this build produced. A code build's version is created together with the build, so this is populated in every status. It is null only when no version references the build. A code update carries an image, and so its build, forward onto a new version, so a build may be named by several versions. This is the earliest, the one the build actually produced.
versionNumber
integernullableint32Version number of
versionId. Null whenversionIdis null.
error
stringnullableError message or failure reason. Null when the build is still running or succeeded.
exitCode
integernullableint32Exit code of the build container. 0 only when the build succeeded. On failure, that container's non-zero code. Null when it exited 0 or never ran, and when the builder could no longer read the code. In both of those the failure belongs to another phase, named by
phasesandlogTail. Null while the build is running.
logTail
stringnullableThe last lines of the build output that belong to the app's own code: what the model file printed and raised when the build imported it, the build's messages about the codebase and its requirements, and the output of the steps that install the declared requirements or, for a container source, run the Dockerfile. Output of the platform's own build steps is never included, on successful and failed builds alike. A failed build's tail always says why: when none of that output explains the failure, it ends with one line that names the platform step the build stopped in, or says that the build was stopped, most often at its time limit. At most 100 lines and 16 KiB. Null while the build runs.
durationMs
integernullableint64Wall-clock milliseconds from
createdAttocompletedAt. Null while the build is still running or when no completion time was recorded.
phases
object[]requiredObserved build phases with their timings, recorded once the build is terminal. Empty until then. Phase lists differ by
source.type. Never assume a fixed list.Array items4 properties each
name
stringrequiredPhase identifier, e.g.
prepare,build,index. Deliberately not an enum. New build kinds report new phases without a contract change.
startedAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-timeNull while the phase is still running.
outcome
stringrequiredPossible values3 values
createdAt
string (date-time)date-time
completedAt
string (date-time)nullabledate-timeWhen the build reached a terminal status (
ready/failed/superseded). Null while running or for terminal builds recorded before this was tracked.
summary
objectrequiredCollection totals for this app's builds list. Independent of the page: the same values on every cursor, including a seek past the last row.
totalcounts builds.versionscounts versions on the same app, the same predicate aslistVersionssummary.total, excluding soft-deleted versions.
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
503 | A required service is temporarily unavailable |
Get a build
A build moves through queued, building and then one of ready, failed or superseded. error is set only on failed: a superseded build was canceled because a newer version took over, which the status already says. The phases a build reports depend on whether it built a codebase or your own Dockerfile, so read them as a list rather than a fixed sequence.
Request
Response
id
string (uuid)requiredUUID v4
appId
stringmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps: it cannot be changed after creation, and it becomes available again once the app it named reaches
deleted.
source
objectrequiredWhere a build's source came from:
codefor a customer code submission,containerfor a customer wrapper Dockerfile.repositoryandrevisionare not yet recorded (both sources are zip uploads) and will be added when the platform stores that provenance.Properties1 property
type
stringrequiredThe kind of source that produced this build:
codeorcontainer, straight from the build record. Build phases differ by kind, so clients must not assume a fixed phase list. Not modeled as an enum so adding a kind later does not churn the existing source-type constants this API shares.
triggeredBy
objectWho performed an action: the authenticated user (JWT) or the API key.
kindsays which, soid(that actor's UUID) is resolvable to the right thing.displayNameis its name captured at write time, so it renders as it was even if the user or key is later renamed. Used asBuild.triggeredByandVersion.author.Properties3 properties
kind
stringrequiredWhether the actor is a user (JWT) or an API key.
Possible values2 values
id
string (uuid)requiredUUID v4
displayName
stringrequired
status
stringrequiredBuild/validation lifecycle status.
Possible values5 values
versionId
string (uuid)nullableUUID v4The version this build produced. A code build's version is created together with the build, so this is populated in every status. It is null only when no version references the build. A code update carries an image, and so its build, forward onto a new version, so a build may be named by several versions. This is the earliest, the one the build actually produced.
versionNumber
integernullableint32Version number of
versionId. Null whenversionIdis null.
error
stringnullableError message or failure reason. Null when the build is still running or succeeded.
exitCode
integernullableint32Exit code of the build container. 0 only when the build succeeded. On failure, that container's non-zero code. Null when it exited 0 or never ran, and when the builder could no longer read the code. In both of those the failure belongs to another phase, named by
phasesandlogTail. Null while the build is running.
logTail
stringnullableThe last lines of the build output that belong to the app's own code: what the model file printed and raised when the build imported it, the build's messages about the codebase and its requirements, and the output of the steps that install the declared requirements or, for a container source, run the Dockerfile. Output of the platform's own build steps is never included, on successful and failed builds alike. A failed build's tail always says why: when none of that output explains the failure, it ends with one line that names the platform step the build stopped in, or says that the build was stopped, most often at its time limit. At most 100 lines and 16 KiB. Null while the build runs.
durationMs
integernullableint64Wall-clock milliseconds from
createdAttocompletedAt. Null while the build is still running or when no completion time was recorded.
phases
object[]requiredObserved build phases with their timings, recorded once the build is terminal. Empty until then. Phase lists differ by
source.type. Never assume a fixed list.Array items4 properties each
name
stringrequiredPhase identifier, e.g.
prepare,build,index. Deliberately not an enum. New build kinds report new phases without a contract change.
startedAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-timeNull while the phase is still running.
outcome
stringrequiredPossible values3 values
createdAt
string (date-time)date-time
completedAt
string (date-time)nullabledate-timeWhen the build reached a terminal status (
ready/failed/superseded). Null while running or for terminal builds recorded before this was tracked.
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
503 | A required service is temporarily unavailable |
Cancel or delete a build
Cancels a queued or running build and records it as superseded. Deleting a queued or running build ends its current rollout without activating the canceled build, so any previous version keeps serving. A terminal build can be deleted once no live rollout still needs it. Ready builds remain while a version references them.
Request
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
409 | Resource already exists or the request conflicts with its current state |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | A required service is temporarily unavailable |