Skip to content

Workflow Version Control

Each change to a workflow can generate a version, creating a complete modification history with the ability to compare and restore previous versions.

  • When saving a workflow, a version can be created manually
  • Before a rollback, the system automatically creates a backup version
  • Each version stores the complete workflow_json (nodes, connections, configuration)
POST /api/versions/workflow/:workflowId
Body: { "description": "Added stock validation node" }

The following is saved:

  • Version number (sequential)
  • Complete workflow JSON
  • Change description
  • Who created it
  • Number of nodes and connections
GET /api/versions/workflow/:workflowId

Returns the list of versions ordered from most recent to oldest:

[
{
"id": 45,
"version_number": 5,
"name": "My Workflow",
"description": "Added validation node",
"is_auto": false,
"nodes_count": 8,
"edges_count": 9,
"created_at": "2026-03-23T10:30:00Z"
},
{
"id": 42,
"version_number": 4,
"description": "Auto-backup before rollback",
"is_auto": true,
...
}
]
POST /api/versions/workflow/:workflowId/rollback/:versionId
  • Restores the workflow_json from the selected version
  • Automatically creates a backup of the current version before restoring
  • Updates the workflow’s modification date
GET /api/versions/workflow/:workflowId/diff/:version1Id/:version2Id

Returns the differences between two versions:

{
"added_nodes": [
{ "id": "node_8", "type": "decision", "label": "Validate stock" }
],
"removed_nodes": [],
"modified_nodes": [
{ "id": "node_3", "changes": ["position", "config"] }
],
"added_edges": [
{ "source": "node_7", "target": "node_8" }
],
"removed_edges": [],
"summary": {
"total_changes": 3,
"nodes_added": 1,
"nodes_removed": 0,
"nodes_modified": 1,
"edges_added": 1,
"edges_removed": 0
}
}
DELETE /api/versions/:versionId

Cannot be deleted if it is the only existing version.

TypeWhen Createdis_auto Field
ManualThe user explicitly saves a versionfalse
AutomaticBefore a rollback (safety backup)true