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:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
name | string | Yes | |
definition | object | Yes | |
environment | "production" | "preview" | "staging" | No | |
source | "cli" | "api" | "git" | No | |
meta | object | No | |
sourceFiles | object[] | No | |
sourceManifest | object | No |
Output:
| Field | Type | Description |
|---|---|---|
deployment | object | |
missingVendorKeys | object[] |
getDeployment
Get a deployment by ID
GET
Usage:
const result = await swirls.client.deployments.getDeployment({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
name | string | |
label | string | null | |
description | string | null | |
definition | object | |
environment | "production" | "preview" | "staging" | |
source | "cli" | "api" | "git" | |
meta | object | null | |
status | "success" | "failed" | |
statusMessage | string | null | |
createdAt | unknown | |
orgId | string | |
userId | string |
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
deploymentId | string | Yes |
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
deploymentId | string | Yes | |
path | string | Yes | |
r2Key | string | No |
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
deploymentId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
missingVendorKeys | object[] |
listDeployments
List all deployments in a project
GET
Usage:
const result = await swirls.client.deployments.listDeployments({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
pagination | object | No | |
environment | "production" | "preview" | "staging" | No | |
source | "cli" | "api" | "git" | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |
listExecutions
List executions for a deployment
GET
Usage:
const result = await swirls.client.deployments.listExecutions({
deploymentId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
deploymentId | string | Yes | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |