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, graphs, nodes, edges, triggers) with the IDs embedded in the definition payload.

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

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

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

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