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:
| 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 |
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 |
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 |
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 |