Skip to content
sproutboatDocs
Esc
↑↓navigate↵open⌘Jpreview

List an app's builds

Newest first, builds of every trigger (CLI, dashboard, git). No cursor: limit only. This route is recorded in the team’s audit trail, so it can answer 503 audit-unavailable.

GET/v1/apps/{project}/builds
Authorization
AuthorizationBearer token · headerrequired

A team API key, sbk_..., from Settings, API keys.

or
x-api-keyAPI key · headerrequired

The same key, in a header of its own.

Path parameters
projectstringrequired

The app's name, unique within the team. 3 to 51 characters (or 1), lowercase letters, digits and dashes, not starting or ending with a dash.

matches ^[a-z0-9](?:[a-z0-9-]{1,49}[a-z0-9])?$
Query parameters
limitinteger
min 1 · max 100 · default: 20
Responses
200

The builds.

buildsBuild[]required
Show properties
Array of Build
idstring<uuid>required
projectstringrequired
statestringrequired
Allowed:queuedbuildingreadyfailedcanceled
cachedboolean

True when the result came from an identical earlier build.

positioninteger | null

Place in the queue while queued.

waitingstring | null

Why a queued build is held back (for example waiting for memory). Not a failure.

supersededboolean

A newer deploy of the project overtook this build; it did not touch the app.

expected_sinteger | null

Estimated seconds to finish. An estimate, not a promise.

estimated_start_sinteger | null
errorobject | null

Set 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 properties
codestring
messagestring
module_sha256string | null

The module this build produced, once ready.

record_generationinteger | null

The app generation the build wrote, once ready. Wait for this to be applied.

hostsstring[]
created_byobject | null
Show properties
namestring
viastring | null
triggerstring

What started it: cli, git, dashboard or operator.

queued_atstring<date-time>
started_atstring<date-time> | null
finished_atstring<date-time> | null
statsobject
Show properties
wall_msinteger | null
cpu_msinteger | null
peak_memory_bytesinteger | null
memory_cap_bytesinteger | null
module_bytesinteger | null
400

The request is malformed. path names the field when one is at fault; some refusals (a digest mismatch, a body that is not JSON) carry a message only.

One of:
ErrorInvalid
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:invalid
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
401

No key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
403

The key lacks a grant (reason: forbidden, need: "<resource>:<action>").

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:forbidden
needstringrequired

The grant, as <resource>:<action>, for example app:write.

429

The 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.

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:key-rate-limited
retry_after_sintegerrequired

Seconds to wait; also the Retry-After header.

503

The audit log could not record the request (reason: audit-unavailable); nothing was served. Retry shortly.

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:audit-unavailable
Request
curl -X GET 'https://dash.sproutboat.com/v1/apps/my-app/builds' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "builds": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "project": "string",
      "state": "queued",
      "cached": true,
      "position": 0,
      "waiting": "string",
      "superseded": true,
      "expected_s": 0,
      "estimated_start_s": 0,
      "error": {
        "code": "string",
        "message": "string"
      },
      "module_sha256": "string",
      "record_generation": 0,
      "hosts": [
        "string"
      ],
      "created_by": {
        "name": "string",
        "via": "string"
      },
      "trigger": "string",
      "queued_at": "2019-08-24T14:15:22Z",
      "started_at": "2019-08-24T14:15:22Z",
      "finished_at": "2019-08-24T14:15:22Z",
      "stats": {
        "wall_ms": 0,
        "cpu_ms": 0,
        "peak_memory_bytes": 0,
        "memory_cap_bytes": 0,
        "module_bytes": 0
      }
    }
  ]
}