Edit workflow
edit_workflowApply a batch of constrained edits to a workflow as a new draft version with compare-and-swap, rejecting stale base versions instead of overwriting concurrent work.
Instructions
Apply a batch of constrained edits as one new draft version under base_version compare-and-swap. Supported ops are set_params, add_step, remove_step, and add_router. Read the exact current definition with get_workflow_version first; a stale base_version is rejected instead of overwriting concurrent work. Editing does not activate the draft.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | One or more edits applied atomically in order. | |
| workflow_id | Yes | The workflow's UUID. | |
| base_version | Yes | The workflow's current_version; the edit conflicts if it changed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | Yes | The new draft version created by the edit. | |
| resolved | No | External identifiers resolved while binding the edit. | |
| projection | Yes | The value-light projection of the edited workflow definition. | |
| workflow_id | Yes | The edited workflow. |