Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get a build by id

Returns the current state, immutable input, settings snapshot, target, diagnostics, and produced or reused version for a build.

GET/v1/builds/{buildId}
Authorization
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

Path parameters
buildIdstringrequired
Responses
200

Response for status 200

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

dataobjectrequired
Show properties
captureobject

URL capture progress and advisory evidence; absent for other inputs.

Show properties
statestringrequired
previewSummaryobject
progressobject
archiveHashstring
idstringrequired

Build id (bld_); opaque and never derived from a version id.

spaceIdstringrequired

Space (spc_) the build produces a version for.

statusstringrequired

Build lifecycle status.

Allowed:waiting_for_sourceuploading_sourcequeuedrunningsucceededfailedcanceledskipped
inputobjectrequired

Public build input. Internal clone URLs and provider source references are hidden.

Show properties
One of:
object
kindstringrequired
sourceUrlstring<uri>required
max length 2048
object
kindstringrequired

Build from an uploaded source archive.

object
kindstringrequired

Build from repository source where clone credentials are not exposed.

refstringrequired

Branch, tag, or ref to build.

commitstring

Exact commit built, once resolved.

branchstring

Branch name when available.

pullRequestNumberinteger
max 9007199254740991
sourceobject | nullrequired

Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's source is the authoritative copy once one exists. Null when nothing was declared.

default: null
Show properties
Any of:
object
kindstringrequired

How this version was produced.

Allowed:direct_uploadclidashboardapigitimportagentbuildvariable_updateconfig_update
clientstring

Publishing client attribution, for example spacefast-cli/1.2.3.

max length 255
branchstring

Git branch the publish came from.

max length 255
commitstring

Git commit SHA the publish came from.

max length 64
messagestring

Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.

max length 2000
dirtyboolean

Whether the working tree had uncommitted changes at publish time.

metadataobject

Additional provenance (repository, CI run URL, workflow, actor, ...).

gitobject
Show properties
repositorystring | null
repositoryFullNamestring | null
repositoryUrlstring | null
refstring | null
branchstring | null
branchAliasUrlstring | null
commitstring | null
commitShastring | null
pullRequestNumbernumber | null
null
null
settingsSnapshotobjectrequired

Resolved build settings. Builds persist this as an immutable settingsSnapshot.

Show properties
rootDirectorystring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
installDirectorystring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
installCommandstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
buildCommandstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
outputDirectorystring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
ignoredBuildCommandstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
frameworkPresetstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
platformPresetstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
allowUnsupportedPlatformFeaturesbooleanrequired
default: false
timeoutSecondsintegerrequired
min 60 · max 7200 · default: 900
targetobjectrequired

Where a successful build should publish or run in preview mode.

Show properties
channelstring | nullrequired

Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.

default: null
Show properties
Any of:
string
string
null
null
previewbooleanrequired

Whether the build targets preview behavior.

default: false
retryOfBuildIdstring | nullrequired

Original build retried by this build.

default: null
producedVersionIdstring | nullrequired

Version (ver_) minted by a successful build; null otherwise.

reusedVersionIdstring | nullrequired

Existing version reused by a successful no-change build; null otherwise.

default: null
diagnosticsobject[]required
default: []
Show properties
Array of object
codestringrequired

Stable snake_case diagnostic code naming the public contract that produced it.

severitystringrequired

How actionable the diagnostic is.

Allowed:infowarningerror
messagestringrequired

Human-readable explanation with enough detail to act on.

pathstring | null

Artifact path the diagnostic points at, for example "_headers:12", when one exists.

providerstring | null

Upstream system the diagnostic originated from, when not Spacefast itself.

Show properties
Any of:
string
string
null
null
detailsobject | null

Machine-readable context for the diagnostic code.

Show properties
Any of:
object
object
null
null
fixstring | null

Concrete, agent-actionable remediation hint, when one can be derived.

retryableboolean | null

Whether retrying the same operation can resolve this diagnostic without the caller changing anything.

createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
startedAtstring<date-time> | nullrequired

When the runner picked the build up.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
finishedAtstring<date-time> | nullrequired

When the build reached a terminal state.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
default

Problem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One sentence on what to do about this error code, the same text as the type page. Read it before retrying.

suggestionsstring[]

Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.

nextstring[]

Copy-pasteable commands or API requests an agent can run next.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.spacefast.com/v1/builds/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "$schema": "http://example.com",
  "data": {
    "capture": {
      "state": "string",
      "previewSummary": {
        "property1": null,
        "property2": null
      },
      "progress": {
        "property1": null,
        "property2": null
      },
      "archiveHash": "string"
    },
    "id": "string",
    "spaceId": "string",
    "status": "waiting_for_source",
    "input": {
      "kind": "url",
      "sourceUrl": "http://example.com"
    },
    "source": null,
    "settingsSnapshot": {
      "rootDirectory": null,
      "installDirectory": null,
      "installCommand": null,
      "buildCommand": null,
      "outputDirectory": null,
      "ignoredBuildCommand": null,
      "frameworkPreset": null,
      "platformPreset": null,
      "allowUnsupportedPlatformFeatures": false,
      "timeoutSeconds": 900
    },
    "target": {
      "channel": null,
      "preview": false
    },
    "retryOfBuildId": null,
    "producedVersionId": "string",
    "reusedVersionId": null,
    "diagnostics": [],
    "createdAt": "2019-08-24T14:15:22Z",
    "startedAt": "2019-08-24T14:15:22Z",
    "finishedAt": "2019-08-24T14:15:22Z"
  }
}

Was this page helpful?