SWIRLS_
ReferenceSDKClient

Deployments

SDK reference for deployments — Deploy and inspect project deployments.

Deploy and inspect project deployments.

deploy

Deploy a merged project definition to Swirls Cloud. Creates a new deployment row and new deployment-scoped resources (forms, webhooks, schedules, workflows, nodes, edges, triggers) with the IDs embedded in the definition payload. Returns the deployment row alongside any vendor keys the deployment needs that are missing from the project vault; executions for affected nodes are held until those keys are set.

POST

Usage:

const result = await swirls.client.deployments.deploy({
  projectId: '...',
  name: '...',
  definition: {},
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
namestringYes
definitionobjectYes
environment"production" | "preview" | "staging"No
source"cli" | "api" | "git"No
metaobjectNo
sourceFilesobject[]No
sourceManifestobjectNo

Output:

FieldTypeDescription
deploymentobject
missingVendorKeysobject[]

getDeployment

Get a deployment by ID

GET

Usage:

const result = await swirls.client.deployments.getDeployment({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

Output:

FieldTypeDescription
idstring
projectIdstring
namestring
labelstring | null
descriptionstring | null
definitionobject
environment"production" | "preview" | "staging"
source"cli" | "api" | "git"
metaobject | null
status"success" | "failed"
statusMessagestring | null
createdAtunknown
orgIdstring
userIdstring

getDeploymentSourceManifest

Get stored .swirls source metadata for a deployment. Returns null for older deployments without source files.

GET

Usage:

const result = await swirls.client.deployments.getDeploymentSourceManifest({
  deploymentId: '...',
})

Input:

ParameterTypeRequiredDescription
deploymentIdstringYes

getDeploymentSourceFile

Get one stored .swirls source file for a deployment. Returns null when the deployment has no source archive or path is missing.

GET

Usage:

const result = await swirls.client.deployments.getDeploymentSourceFile({
  deploymentId: '...',
  path: '...',
})

Input:

ParameterTypeRequiredDescription
deploymentIdstringYes
pathstringYes
r2KeystringNo

getMissingVendorKeys

Vendor keys the deployment needs that are absent from the project vault. Empty for Enterprise orgs (Autumn platform_keys) and for deployments that need no vendor keys. Cloud UI surfaces these on the deployment detail page and on partner cards.

GET

Usage:

const result = await swirls.client.deployments.getMissingVendorKeys({
  deploymentId: '...',
})

Input:

ParameterTypeRequiredDescription
deploymentIdstringYes

Output:

FieldTypeDescription
missingVendorKeysobject[]

listDeployments

List all deployments in a project

GET

Usage:

const result = await swirls.client.deployments.listDeployments({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
paginationobjectNo
environment"production" | "preview" | "staging"No
source"cli" | "api" | "git"No

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

listExecutions

List executions for a deployment

GET

Usage:

const result = await swirls.client.deployments.listExecutions({
  deploymentId: '...',
})

Input:

ParameterTypeRequiredDescription
deploymentIdstringYes
paginationobjectNo

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

On this page