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

GETapi.serverless.runware.ai/v1/apps/{appId}/versions

Request

Path

appId

stringrequiredmin: 6max: 30

Immutable app identifier, unique among the authenticated organization's live apps.

Query

limit

integerint32min: 1max: 100default: 20

Maximum number of items to return.

cursor

string

Opaque pagination cursor returned by a previous call, as nextCursor or, on the operations that offer one, prevCursor.

Response

nextCursor

stringnullable

Cursor for the next page. Null when there are no more items.

data

object[]required
Array items9 properties each

id

string (uuid)requiredUUID v4

appId

stringrequiredmin: 6max: 30

Immutable 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

integerrequiredint32

Monotonically increasing per app.

buildId

string (uuid)nullableUUID v4

The build that produced this version's image. Both source types build. A code source bakes an image around a submitted codebase, a container source builds the customer's own wrapper Dockerfile. A version created by an update carries the image, and therefore this build, forward.

gpuType

stringnullablemin: 1max: 64

Preferred GPU type of this version, taken from the config snapshot.

author

objectnullable

Who created this version: the authenticated user (JWT) or the API key. displayName is the name captured at write time.

Properties3 properties
kind
stringrequired

Whether the actor is a user (JWT) or an API key.

Possible values2 values
id
string (uuid)requiredUUID v4
displayName
stringrequired

buildDurationMs

integernullableint64

Wall-clock milliseconds of the named build (completedAt - createdAt on 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

objectnullable

Structured diff against the previous version. Null on version 1.

Properties5 properties
imageChanged
booleanrequired

True when this version names a different image than the previous one (buildId or imageRef changed). False for a config-only update, which carries the image forward.

workerConfig
object[]
Array items3 properties each
field
stringrequired
from
stringrequirednullable
to
stringrequirednullable

Keys added, removed, or changed between consecutive versions. For environment variables, changed is keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it is mountPath. changed is omitted on those two (a path either exists or does not).

Properties3 properties
added
string[]
removed
string[]
changed
string[]
endpoints
object

Keys added, removed, or changed between consecutive versions. For environment variables, changed is keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it is mountPath. changed is omitted on those two (a path either exists or does not).

Properties3 properties
added
string[]
removed
string[]
changed
string[]
volumes
object

Keys added, removed, or changed between consecutive versions. For environment variables, changed is keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it is mountPath. changed is omitted on those two (a path either exists or does not).

Properties3 properties
added
string[]
removed
string[]
changed
string[]

createdAt

string (date-time)requireddate-time

summary

objectrequired

Collection totals for a paged list. Independent of the page: total is 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: 0

Number of items in the collection this page was drawn from.

Errors

StatusWhen
400The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
401Missing or invalid credentials
404Resource not found
422The 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.
500Unexpected server error
503A required service is temporarily unavailable

Get a version

GETapi.serverless.runware.ai/v1/apps/{appId}/versions/{versionNumber}

Request

Path

appId

stringrequiredmin: 6max: 30

Immutable app identifier, unique among the authenticated organization's live apps.

versionNumber

integerrequiredint32

Response

id

string (uuid)requiredUUID v4

appId

stringrequiredmin: 6max: 30

Immutable 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

integerrequiredint32

Monotonically increasing per app.

buildId

string (uuid)nullableUUID v4

The build that produced this version's image. Both source types build. A code source bakes an image around a submitted codebase, a container source builds the customer's own wrapper Dockerfile. A version created by an update carries the image, and therefore this build, forward.

gpuType

stringnullablemin: 1max: 64

Preferred GPU type of this version, taken from the config snapshot.

author

objectnullable

Who created this version: the authenticated user (JWT) or the API key. displayName is the name captured at write time.

Properties3 properties

kind

stringrequired

Whether the actor is a user (JWT) or an API key.

Possible values2 values

id

string (uuid)requiredUUID v4

displayName

stringrequired

buildDurationMs

integernullableint64

Wall-clock milliseconds of the named build (completedAt - createdAt on 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

objectnullable

Structured diff against the previous version. Null on version 1.

Properties5 properties

imageChanged

booleanrequired

True when this version names a different image than the previous one (buildId or imageRef changed). False for a config-only update, which carries the image forward.

workerConfig

object[]
Array items3 properties each
field
stringrequired
from
stringrequirednullable
to
stringrequirednullable

Keys added, removed, or changed between consecutive versions. For environment variables, changed is keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it is mountPath. changed is omitted on those two (a path either exists or does not).

Properties3 properties
added
string[]
removed
string[]
changed
string[]

endpoints

object

Keys added, removed, or changed between consecutive versions. For environment variables, changed is keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it is mountPath. changed is omitted on those two (a path either exists or does not).

Properties3 properties
added
string[]
removed
string[]
changed
string[]

volumes

object

Keys added, removed, or changed between consecutive versions. For environment variables, changed is keys whose value changed (the value itself is never returned). For endpoints the key is the path. For volumes it is mountPath. changed is omitted on those two (a path either exists or does not).

Properties3 properties
added
string[]
removed
string[]
changed
string[]

createdAt

string (date-time)requireddate-time

Errors

StatusWhen
400The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
401Missing or invalid credentials
404Resource not found
422The 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.
500Unexpected server error
503A required service is temporarily unavailable

Delete a version

DELETEapi.serverless.runware.ai/v1/apps/{appId}/versions/{versionNumber}

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

Path

appId

stringrequiredmin: 6max: 30

Immutable app identifier, unique among the authenticated organization's live apps.

versionNumber

integerrequiredint32

Errors

StatusWhen
400The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
401Missing or invalid credentials
404Resource not found
409Resource already exists or the request conflicts with its current state
422The 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.
500Unexpected server error
503A required service is temporarily unavailable

List builds

GETapi.serverless.runware.ai/v1/apps/{appId}/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

Path

appId

stringrequiredmin: 6max: 30

Immutable app identifier, unique among the authenticated organization's live apps.

Query

limit

integerint32min: 1max: 100default: 20

Maximum number of items to return.

cursor

string

Opaque pagination cursor returned by a previous call, as nextCursor or, on the operations that offer one, prevCursor.

Response

nextCursor

stringnullable

Cursor for the next page. Null when there are no more items.

data

object[]required
Array items14 properties each

id

string (uuid)requiredUUID v4

appId

stringmin: 6max: 30

Immutable 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

objectrequired

Where a build's source came from: code for a customer code submission, container for a customer wrapper Dockerfile. repository and revision are not yet recorded (both sources are zip uploads) and will be added when the platform stores that provenance.

Properties1 property
type
stringrequired

The kind of source that produced this build: code or container, 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.

Who performed an action: the authenticated user (JWT) or the API key. kind says which, so id (that actor's UUID) is resolvable to the right thing. displayName is its name captured at write time, so it renders as it was even if the user or key is later renamed. Used as Build.triggeredBy and Version.author.

Properties3 properties
kind
stringrequired

Whether the actor is a user (JWT) or an API key.

Possible values2 values
id
string (uuid)requiredUUID v4
displayName
stringrequired

status

stringrequired

Build/validation lifecycle status.

Possible values5 values

versionId

string (uuid)nullableUUID v4

The 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

integernullableint32

Version number of versionId. Null when versionId is null.

error

stringnullable

Error message or failure reason. Null when the build is still running or succeeded.

exitCode

integernullableint32

Exit 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 phases and logTail. Null while the build is running.

logTail

stringnullable

The 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

integernullableint64

Wall-clock milliseconds from createdAt to completedAt. Null while the build is still running or when no completion time was recorded.

phases

object[]required

Observed 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
stringrequired

Phase 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-time

Null while the phase is still running.

outcome
stringrequired
Possible values3 values

createdAt

string (date-time)date-time

completedAt

string (date-time)nullabledate-time

When the build reached a terminal status (ready/failed/superseded). Null while running or for terminal builds recorded before this was tracked.

summary

objectrequired

Collection totals for this app's builds list. Independent of the page: the same values on every cursor, including a seek past the last row. total counts builds. versions counts versions on the same app, the same predicate as listVersions summary.total, excluding soft-deleted versions.

Properties2 properties

total

integerrequiredint64min: 0

Number of builds recorded for this app.

versions

integerrequiredint64min: 0

Number of versions recorded for this app. Same value as listVersions summary.total. A config-only update increments this without incrementing total.

Errors

StatusWhen
400The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
401Missing or invalid credentials
404Resource not found
422The 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.
500Unexpected server error
503A required service is temporarily unavailable

Get a build

GETapi.serverless.runware.ai/v1/apps/{appId}/builds/{buildId}

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

Path

appId

stringrequiredmin: 6max: 30

Immutable app identifier, unique among the authenticated organization's live apps.

buildId

string (uuid)requiredUUID v4

Response

id

string (uuid)requiredUUID v4

appId

stringmin: 6max: 30

Immutable 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

objectrequired

Where a build's source came from: code for a customer code submission, container for a customer wrapper Dockerfile. repository and revision are not yet recorded (both sources are zip uploads) and will be added when the platform stores that provenance.

Properties1 property

type

stringrequired

The kind of source that produced this build: code or container, 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.

Who performed an action: the authenticated user (JWT) or the API key. kind says which, so id (that actor's UUID) is resolvable to the right thing. displayName is its name captured at write time, so it renders as it was even if the user or key is later renamed. Used as Build.triggeredBy and Version.author.

Properties3 properties

kind

stringrequired

Whether the actor is a user (JWT) or an API key.

Possible values2 values

id

string (uuid)requiredUUID v4

displayName

stringrequired

status

stringrequired

Build/validation lifecycle status.

Possible values5 values

versionId

string (uuid)nullableUUID v4

The 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

integernullableint32

Version number of versionId. Null when versionId is null.

error

stringnullable

Error message or failure reason. Null when the build is still running or succeeded.

exitCode

integernullableint32

Exit 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 phases and logTail. Null while the build is running.

logTail

stringnullable

The 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

integernullableint64

Wall-clock milliseconds from createdAt to completedAt. Null while the build is still running or when no completion time was recorded.

phases

object[]required

Observed 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

stringrequired

Phase 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-time

Null while the phase is still running.

outcome

stringrequired
Possible values3 values

createdAt

string (date-time)date-time

completedAt

string (date-time)nullabledate-time

When the build reached a terminal status (ready/failed/superseded). Null while running or for terminal builds recorded before this was tracked.

Errors

StatusWhen
400The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
401Missing or invalid credentials
404Resource not found
422The 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.
500Unexpected server error
503A required service is temporarily unavailable

Cancel or delete a build

DELETEapi.serverless.runware.ai/v1/apps/{appId}/builds/{buildId}

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

Path

appId

stringrequiredmin: 6max: 30

Immutable app identifier, unique among the authenticated organization's live apps.

buildId

string (uuid)requiredUUID v4

Errors

StatusWhen
400The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
401Missing or invalid credentials
404Resource not found
409Resource already exists or the request conflicts with its current state
422The 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.
500Unexpected server error
502An upstream service was unreachable or refused the request
503A required service is temporarily unavailable