|
| 1 | +--- |
| 2 | +title: Deployments |
| 3 | +description: Manage workflow deployments |
| 4 | +--- |
| 5 | + |
| 6 | +import { BlockInfoCard } from "@/components/ui/block-info-card" |
| 7 | + |
| 8 | +<BlockInfoCard |
| 9 | + type="deployments" |
| 10 | + color="#0C0C0C" |
| 11 | +/> |
| 12 | + |
| 13 | +## Usage Instructions |
| 14 | + |
| 15 | +Deploy, undeploy, and roll back workflows in the current workspace. Promote a previous deployment version to live, list every version, or fetch the deployed workflow state for a specific version. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Actions |
| 20 | + |
| 21 | +### `deployments_deploy` |
| 22 | + |
| 23 | +Deploy a workflow’s current draft state, creating a new deployment version and making it live for API execution. Requires admin permission on the workflow’s workspace. |
| 24 | + |
| 25 | +#### Input |
| 26 | + |
| 27 | +| Parameter | Type | Required | Description | |
| 28 | +| --------- | ---- | -------- | ----------- | |
| 29 | +| `workflowId` | string | Yes | ID of the workflow to deploy | |
| 30 | +| `name` | string | No | Optional label for the new deployment version | |
| 31 | +| `description` | string | No | Optional summary of what changed in this version | |
| 32 | + |
| 33 | +#### Output |
| 34 | + |
| 35 | +| Parameter | Type | Description | |
| 36 | +| --------- | ---- | ----------- | |
| 37 | +| `workflowId` | string | ID of the deployed workflow | |
| 38 | +| `isDeployed` | boolean | Whether the workflow is now deployed | |
| 39 | +| `deployedAt` | string | ISO 8601 timestamp of the deployment \(null if unavailable\) | |
| 40 | +| `version` | number | The deployment version that is now active | |
| 41 | +| `warnings` | array | Non-fatal warnings \(e.g. trigger or schedule sync still in progress\) | |
| 42 | + |
| 43 | +### `deployments_undeploy` |
| 44 | + |
| 45 | +Take a deployed workflow offline. API execution stops and schedules, webhooks, and other deployment side effects are removed. Requires admin permission on the workflow’s workspace. |
| 46 | + |
| 47 | +#### Input |
| 48 | + |
| 49 | +| Parameter | Type | Required | Description | |
| 50 | +| --------- | ---- | -------- | ----------- | |
| 51 | +| `workflowId` | string | Yes | ID of the workflow to undeploy | |
| 52 | + |
| 53 | +#### Output |
| 54 | + |
| 55 | +| Parameter | Type | Description | |
| 56 | +| --------- | ---- | ----------- | |
| 57 | +| `workflowId` | string | ID of the undeployed workflow | |
| 58 | +| `isDeployed` | boolean | Whether the workflow is still deployed \(false\) | |
| 59 | +| `deployedAt` | string | Always null after an undeploy | |
| 60 | +| `warnings` | array | Non-fatal warnings \(e.g. trigger or schedule cleanup still in progress\) | |
| 61 | + |
| 62 | +### `deployments_promote` |
| 63 | + |
| 64 | +Make a specific deployment version the live one without creating a new version — the same operation as Promote to live in the deploy modal. Useful for rolling back to a known-good version. Also works on an undeployed workflow: it re-deploys the workflow live at that version. Requires admin permission on the workflow’s workspace. |
| 65 | + |
| 66 | +#### Input |
| 67 | + |
| 68 | +| Parameter | Type | Required | Description | |
| 69 | +| --------- | ---- | -------- | ----------- | |
| 70 | +| `workflowId` | string | Yes | ID of the workflow | |
| 71 | +| `version` | number | Yes | The deployment version number to promote to live | |
| 72 | + |
| 73 | +#### Output |
| 74 | + |
| 75 | +| Parameter | Type | Description | |
| 76 | +| --------- | ---- | ----------- | |
| 77 | +| `workflowId` | string | ID of the workflow | |
| 78 | +| `isDeployed` | boolean | Whether the workflow is now deployed | |
| 79 | +| `deployedAt` | string | ISO 8601 timestamp of the active deployment \(null if unavailable\) | |
| 80 | +| `version` | number | The deployment version that is now live | |
| 81 | +| `warnings` | array | Non-fatal warnings \(e.g. trigger or schedule sync still in progress\) | |
| 82 | + |
| 83 | +### `deployments_list_versions` |
| 84 | + |
| 85 | +List every deployment version of a workflow, newest first, including which version is currently live. |
| 86 | + |
| 87 | +#### Input |
| 88 | + |
| 89 | +| Parameter | Type | Required | Description | |
| 90 | +| --------- | ---- | -------- | ----------- | |
| 91 | +| `workflowId` | string | Yes | ID of the workflow | |
| 92 | + |
| 93 | +#### Output |
| 94 | + |
| 95 | +| Parameter | Type | Description | |
| 96 | +| --------- | ---- | ----------- | |
| 97 | +| `workflowId` | string | ID of the workflow | |
| 98 | +| `versions` | array | Deployment versions, newest first \(id, version, name, description, isActive, createdAt, createdBy, deployedByName\) | |
| 99 | + |
| 100 | +### `deployments_get_version` |
| 101 | + |
| 102 | +Fetch a single deployment version of a workflow, including its metadata and the full workflow state snapshot that was deployed. |
| 103 | + |
| 104 | +#### Input |
| 105 | + |
| 106 | +| Parameter | Type | Required | Description | |
| 107 | +| --------- | ---- | -------- | ----------- | |
| 108 | +| `workflowId` | string | Yes | ID of the workflow | |
| 109 | +| `version` | number | Yes | The deployment version number to fetch | |
| 110 | + |
| 111 | +#### Output |
| 112 | + |
| 113 | +| Parameter | Type | Description | |
| 114 | +| --------- | ---- | ----------- | |
| 115 | +| `workflowId` | string | ID of the workflow | |
| 116 | +| `version` | number | The deployment version number | |
| 117 | +| `name` | string | Version label | |
| 118 | +| `description` | string | Version description | |
| 119 | +| `isActive` | boolean | Whether this version is currently live | |
| 120 | +| `createdAt` | string | When this version was deployed \(ISO 8601\) | |
| 121 | +| `deployedState` | json | The full workflow state snapshot \(blocks, edges, loops, parallels, variables\) | |
| 122 | + |
| 123 | + |
0 commit comments