Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get a space's runtime status

Returns the serving runtime’s health and placement for this space: instance, region, and serving state.

GET/v1/spaces/{spaceId}/runtime
Authorization
AuthorizationBearer token · headerrequired

Space key (sfc_…) for an unclaimed anonymous Space. Also the fragment of its claim URL and the token of its /__/<key> door. A publish without a credential returns it in claim with the claim link. With the key, getSpace extends the Space's expiry window, getSpaceVersion follows its publish, createSpaceOpenLink returns its reusable open link, and restoreSpace undoes a deleteSpace while the claim window remains open.

or
AuthorizationBearer token · headerrequired

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

Path parameters
spaceIdstringrequired
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
liveVersionIdstring | nullrequired

Version that the live space URL now points to, if any.

pendingVersionIdstring | nullrequired

Version that live traffic is trying to publish now, if any.

liveUrlstring | nullrequired

Live space URL. It moves to the latest version after a successful publish to live.

runtimeStatestringrequired

Space operation-lifecycle status.

Allowed:provisioningactiveupdatingdeletingfailed
liveVersionStatusstring | nullrequired
Show properties
Any of:
string
string
null
null
pendingVersionStatusstring | nullrequired
Show properties
Any of:
string
string
null
null
operationobject | nullrequired
Show properties
Any of:
object
idstringrequired
kindstringrequired
statusstringrequired
Allowed:queuedrunningsucceededfailedcanceled
resourcesobject[]required
Show properties
Array of object
typestringrequired
idstringrequired
progressobject
Show properties
totalintegerrequired
min 0 · max 9007199254740991
completedintegerrequired
min 0 · max 9007199254740991
failedintegerrequired
min 0 · max 9007199254740991
diagnosticsobject[]
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))$
finishedAtstring<date-time>
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))$
null
null
appobject | nullrequired

What the live version runs: its Zero capsule and its Functions worker, each null when the published tree carries none of that product (both null for a space without a runtime). The whole object is null for callers whose credential does not carry versions:read, because app details read version contents, not serving state.

Show properties
Any of:
object
capsuleobject | nullrequired

The live version's Zero capsule, if it carries one.

Show properties
Any of:
object
artifactIdstringrequired
min length 1
appNamestringrequired
min length 1
serverRuntimestringrequired
inspectobjectrequired
Show properties
policystringrequired
Allowed:privatepublic
installobjectrequired
Show properties
runtimeKindstringrequired
enginestringrequired
storageRootstringrequired
artifactPathstringrequired
configPathstringrequired
binaryobjectrequired
Show properties
pathstringrequired
compatibilityTargetobjectrequired
Show properties
profilestringrequired
osstringrequired
cpustringrequired
libcstringrequired
linkingstringrequired
requireExecutableBitbooleanrequired
sha256string | nullrequired
default: null
Show properties
Any of:
string
string
null
null
requiredbooleanrequired
mysqlobjectrequired
Show properties
migrateAtFinalizebooleanrequired
blockIncompatibleRollbackbooleanrequired
realtimeobjectrequired
Show properties
productionstringrequired
localstringrequired
tablesstring[]required
default: []
queriesstring[]required
default: []
mutationsstring[]required
default: []
actionsstring[]

Action names. Included when Accept requests application/json; spacefast-capsule-actions=1.

endpointsobject[]required
default: []
Show properties
Array of object
methodstringrequired
Allowed:GETHEADPOSTPUTPATCHDELETEOPTIONS
pathstringrequired
min length 1 · max length 2048 · matches ^\/.*
socketsstring[]required
default: []
serverBundleSizeinteger | nullrequired

Compiled server bundle size in bytes, or null when this version's metadata does not record it.

Show properties
Any of:
integer
integer
null
null
clientBundleSizeinteger | nullrequired

Compiled client bundle size in bytes, or null when this version's metadata does not record it.

Show properties
Any of:
integer
integer
null
null
migrationCountintegerrequired
min 0 · max 9007199254740991
schemaHashstring | nullrequired
Show properties
Any of:
string
string
null
null
variablesobjectrequired
Show properties
sourcestringrequired
namesstring[]required
default: []
realtimeobjectrequired
Show properties
centralUrlstring<uri> | nullrequired
default: null
Show properties
Any of:
string<uri>
string<uri>
null
null
pathstring
min length 1 · matches ^\/.*
replayPathstring | null
Show properties
Any of:
string
string
null
null
replayUrlstring<uri> | null
Show properties
Any of:
string<uri>
string<uri>
null
null
runPathstring | null
Show properties
Any of:
string
string
null
null
runUrlstring<uri> | null
Show properties
Any of:
string<uri>
string<uri>
null
null
resourceKeystring | null
Show properties
Any of:
string
string
null
null
ticketPathstring | null
Show properties
Any of:
string
string
null
null
socketPathstring | null
Show properties
Any of:
string
string
null
null
spaceIdstring | null
Show properties
Any of:
string
string
null
null
versionIdstring | null
Show properties
Any of:
string
string
null
null
null
null
workerobject | nullrequired

The live version's Functions worker, if it carries one.

Show properties
Any of:
object
artifactIdstringrequired
min length 1
appNamestringrequired
min length 1
entrystringrequired
min length 1
compatibilityDatestringrequired
matches ^\d{4}-\d{2}-\d{2}$
compatibilityFlagsstring[]required
default: []
routesobject[]required
default: []
Show properties
Array of object
methodstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
pathstringrequired
min length 1 · max length 2048 · matches ^\/.*
subtreebooleanrequired
default: false
capabilitiesobjectrequired
default: {}
Show properties
dbboolean
default: false
fetchboolean
default: true
authboolean
default: false
envboolean
default: false
realtimeboolean
default: false
loggingboolean
default: false
gravatarboolean
default: false
spamboolean
default: false
emailboolean
default: false
contentboolean
default: false
storageboolean
default: false
connectorsboolean
default: false
cryptoboolean
default: false
executionStatestringrequired
Allowed:absentreadyserving
bundleSizeintegerrequired
min 0 · max 9007199254740991
bundleSha256stringrequired
matches ^sha256:[a-f0-9]{64}$
variablesobjectrequired
Show properties
sourcestringrequired
namesstring[]required
default: []
null
null
null
null
pendingAppobject | nullrequired

What the pending version would run — the same projection as app, read from pendingVersionId's version so a dashboard can show what an in-flight publish is about to serve. Null when no publish is in flight, and null for callers without versions:read, exactly like app.

Show properties
Any of:
object
capsuleobject | nullrequired

The live version's Zero capsule, if it carries one.

Show properties
Any of:
object
artifactIdstringrequired
min length 1
appNamestringrequired
min length 1
serverRuntimestringrequired
inspectobjectrequired
Show properties
policystringrequired
Allowed:privatepublic
installobjectrequired
Show properties
runtimeKindstringrequired
enginestringrequired
storageRootstringrequired
artifactPathstringrequired
configPathstringrequired
binaryobjectrequired
Show properties
pathstringrequired
compatibilityTargetobjectrequired
Show properties
profilestringrequired
osstringrequired
cpustringrequired
libcstringrequired
linkingstringrequired
requireExecutableBitbooleanrequired
sha256string | nullrequired
default: null
Show properties
Any of:
string
string
null
null
requiredbooleanrequired
mysqlobjectrequired
Show properties
migrateAtFinalizebooleanrequired
blockIncompatibleRollbackbooleanrequired
realtimeobjectrequired
Show properties
productionstringrequired
localstringrequired
tablesstring[]required
default: []
queriesstring[]required
default: []
mutationsstring[]required
default: []
actionsstring[]

Action names. Included when Accept requests application/json; spacefast-capsule-actions=1.

endpointsobject[]required
default: []
Show properties
Array of object
methodstringrequired
Allowed:GETHEADPOSTPUTPATCHDELETEOPTIONS
pathstringrequired
min length 1 · max length 2048 · matches ^\/.*
socketsstring[]required
default: []
serverBundleSizeinteger | nullrequired

Compiled server bundle size in bytes, or null when this version's metadata does not record it.

Show properties
Any of:
integer
integer
null
null
clientBundleSizeinteger | nullrequired

Compiled client bundle size in bytes, or null when this version's metadata does not record it.

Show properties
Any of:
integer
integer
null
null
migrationCountintegerrequired
min 0 · max 9007199254740991
schemaHashstring | nullrequired
Show properties
Any of:
string
string
null
null
variablesobjectrequired
Show properties
sourcestringrequired
namesstring[]required
default: []
realtimeobjectrequired
Show properties
centralUrlstring<uri> | nullrequired
default: null
Show properties
Any of:
string<uri>
string<uri>
null
null
pathstring
min length 1 · matches ^\/.*
replayPathstring | null
Show properties
Any of:
string
string
null
null
replayUrlstring<uri> | null
Show properties
Any of:
string<uri>
string<uri>
null
null
runPathstring | null
Show properties
Any of:
string
string
null
null
runUrlstring<uri> | null
Show properties
Any of:
string<uri>
string<uri>
null
null
resourceKeystring | null
Show properties
Any of:
string
string
null
null
ticketPathstring | null
Show properties
Any of:
string
string
null
null
socketPathstring | null
Show properties
Any of:
string
string
null
null
spaceIdstring | null
Show properties
Any of:
string
string
null
null
versionIdstring | null
Show properties
Any of:
string
string
null
null
null
null
workerobject | nullrequired

The live version's Functions worker, if it carries one.

Show properties
Any of:
object
artifactIdstringrequired
min length 1
appNamestringrequired
min length 1
entrystringrequired
min length 1
compatibilityDatestringrequired
matches ^\d{4}-\d{2}-\d{2}$
compatibilityFlagsstring[]required
default: []
routesobject[]required
default: []
Show properties
Array of object
methodstring | nullrequired
default: null
Show properties
Any of:
string
string
null
null
pathstringrequired
min length 1 · max length 2048 · matches ^\/.*
subtreebooleanrequired
default: false
capabilitiesobjectrequired
default: {}
Show properties
dbboolean
default: false
fetchboolean
default: true
authboolean
default: false
envboolean
default: false
realtimeboolean
default: false
loggingboolean
default: false
gravatarboolean
default: false
spamboolean
default: false
emailboolean
default: false
contentboolean
default: false
storageboolean
default: false
connectorsboolean
default: false
cryptoboolean
default: false
executionStatestringrequired
Allowed:absentreadyserving
bundleSizeintegerrequired
min 0 · max 9007199254740991
bundleSha256stringrequired
matches ^sha256:[a-f0-9]{64}$
variablesobjectrequired
Show properties
sourcestringrequired
namesstring[]required
default: []
null
null
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/spaces/string/runtime' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "$schema": "http://example.com",
  "data": {
    "liveVersionId": "string",
    "pendingVersionId": "string",
    "liveUrl": "string",
    "runtimeState": "provisioning",
    "liveVersionStatus": "building",
    "pendingVersionStatus": "building",
    "operation": {
      "id": "string",
      "kind": "string",
      "status": "queued",
      "resources": [
        {
          "type": "string",
          "id": "string"
        }
      ],
      "progress": {
        "total": 0,
        "completed": 0,
        "failed": 0
      },
      "diagnostics": [
        {
          "code": "string",
          "severity": "info",
          "message": "string",
          "path": "string",
          "provider": "infra",
          "details": {
            "property1": null,
            "property2": null
          },
          "fix": "string",
          "retryable": true
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "finishedAt": "2019-08-24T14:15:22Z"
    },
    "app": {
      "capsule": {
        "artifactId": "string",
        "appName": "string",
        "serverRuntime": "quickjs-rust",
        "inspect": {
          "policy": "private"
        },
        "install": {
          "runtimeKind": "zero",
          "engine": "quickjs-rust",
          "storageRoot": "__spacefast/zero",
          "artifactPath": "__spacefast/zero/artifact.json",
          "configPath": "__spacefast/zero/config.json",
          "binary": {
            "path": "__spacefast/zero/bin/stattic-runtime",
            "compatibilityTarget": {
              "profile": "linux-x86_64-gnu-v1",
              "os": "linux",
              "cpu": "x86_64",
              "libc": "glibc",
              "linking": "dynamic",
              "requireExecutableBit": true
            },
            "sha256": null,
            "required": true
          },
          "mysql": {
            "migrateAtFinalize": true,
            "blockIncompatibleRollback": true
          },
          "realtime": {
            "production": "central",
            "local": "foreground-cli-ws"
          }
        },
        "tables": [],
        "queries": [],
        "mutations": [],
        "actions": [
          "string"
        ],
        "endpoints": [],
        "sockets": [],
        "serverBundleSize": 0,
        "clientBundleSize": 0,
        "migrationCount": 0,
        "schemaHash": "string",
        "variables": {
          "source": "stattic-variables",
          "names": []
        },
        "realtime": {
          "centralUrl": null,
          "path": "string",
          "replayPath": "string",
          "replayUrl": "http://example.com",
          "runPath": "string",
          "runUrl": "http://example.com",
          "resourceKey": "string",
          "ticketPath": "string",
          "socketPath": "string",
          "spaceId": "string",
          "versionId": "string"
        }
      },
      "worker": {
        "artifactId": "string",
        "appName": "string",
        "entry": "string",
        "compatibilityDate": "string",
        "compatibilityFlags": [],
        "routes": [],
        "capabilities": {},
        "executionState": "absent",
        "bundleSize": 0,
        "bundleSha256": "string",
        "variables": {
          "source": "spacefast-variables",
          "names": []
        }
      }
    },
    "pendingApp": {
      "capsule": {
        "artifactId": "string",
        "appName": "string",
        "serverRuntime": "quickjs-rust",
        "inspect": {
          "policy": "private"
        },
        "install": {
          "runtimeKind": "zero",
          "engine": "quickjs-rust",
          "storageRoot": "__spacefast/zero",
          "artifactPath": "__spacefast/zero/artifact.json",
          "configPath": "__spacefast/zero/config.json",
          "binary": {
            "path": "__spacefast/zero/bin/stattic-runtime",
            "compatibilityTarget": {
              "profile": "linux-x86_64-gnu-v1",
              "os": "linux",
              "cpu": "x86_64",
              "libc": "glibc",
              "linking": "dynamic",
              "requireExecutableBit": true
            },
            "sha256": null,
            "required": true
          },
          "mysql": {
            "migrateAtFinalize": true,
            "blockIncompatibleRollback": true
          },
          "realtime": {
            "production": "central",
            "local": "foreground-cli-ws"
          }
        },
        "tables": [],
        "queries": [],
        "mutations": [],
        "actions": [
          "string"
        ],
        "endpoints": [],
        "sockets": [],
        "serverBundleSize": 0,
        "clientBundleSize": 0,
        "migrationCount": 0,
        "schemaHash": "string",
        "variables": {
          "source": "stattic-variables",
          "names": []
        },
        "realtime": {
          "centralUrl": null,
          "path": "string",
          "replayPath": "string",
          "replayUrl": "http://example.com",
          "runPath": "string",
          "runUrl": "http://example.com",
          "resourceKey": "string",
          "ticketPath": "string",
          "socketPath": "string",
          "spaceId": "string",
          "versionId": "string"
        }
      },
      "worker": {
        "artifactId": "string",
        "appName": "string",
        "entry": "string",
        "compatibilityDate": "string",
        "compatibilityFlags": [],
        "routes": [],
        "capabilities": {},
        "executionState": "absent",
        "bundleSize": 0,
        "bundleSha256": "string",
        "variables": {
          "source": "spacefast-variables",
          "names": []
        }
      }
    }
  }
}

Was this page helpful?