Get Execution Status
Retrieve the current status of a specific workflow execution.
Endpoint
GET /api/workflows/execution/{executionId}
Path Parameters
Unique execution identifier returned from the execute endpoint
Example Request
curl http://localhost:3003/api/workflows/execution/exec-1709856234567
Response
Execution status: idle, running, completed, error, stopped
ID of the currently executing node
Error message if status is error
ID of the node where execution is paused (if paused)
Reason for pause: wait-pause, breakpoint, or null
{
"executionId": "exec-1709856234567",
"status": "running",
"currentNodeId": "click-2",
"pausedNodeId": null,
"pauseReason": null
}
Get Execution Status (Query)
Alternative endpoint to get execution status by query parameter or most recent execution.
Endpoint
GET /api/workflows/execution/status
Query Parameters
Execution ID (optional). If not provided, returns most recent execution status
Example Request
# Get specific execution
curl "http://localhost:3003/api/workflows/execution/status?executionId=exec-1709856234567"
# Get most recent execution
curl http://localhost:3003/api/workflows/execution/status
List Active Executions
Get a list of all currently active workflow executions.
Endpoint
GET /api/workflows/executions/active
Example Request
curl http://localhost:3003/api/workflows/executions/active
Response
Total number of active executions
Array of active execution status objects
{
"totalActive": 3,
"executions": [
{
"executionId": "exec-1709856234567",
"status": "running",
"currentNodeId": "navigate-1"
},
{
"executionId": "exec-1709856234568",
"status": "running",
"currentNodeId": "click-2"
},
{
"executionId": "exec-1709856234569",
"status": "running",
"currentNodeId": "type-1"
}
]
}
Stop Execution
Stop a specific workflow execution or the most recent execution.
Endpoint
POST /api/workflows/execution/stop
Request Body
Execution ID to stop (optional). If not provided, stops most recent execution
Example Request
curl -X POST http://localhost:3003/api/workflows/execution/stop \
-H "Content-Type: application/json" \
-d '{
"executionId": "exec-1709856234567"
}'
Response
Whether the stop operation succeeded
ID of the stopped execution
Whether the execution was running when stopped
Whether the execution was queued when stopped
{
"success": true,
"message": "Execution stopped",
"executionId": "exec-1709856234567",
"wasRunning": true,
"wasQueued": false
}
Stop All Executions
Stop all running batches and cancel all queued workflows.
Endpoint
POST /api/workflows/execution/stop-all
Example Request
curl -X POST http://localhost:3003/api/workflows/execution/stop-all
Response
Whether the operation succeeded
Total number of batches stopped
Total number of executions stopped
Number of running executions stopped
Number of queued executions cancelled
Array of stopped batch IDs
{
"success": true,
"message": "All executions stopped",
"totalBatches": 2,
"totalStopped": 8,
"runningStopped": 3,
"queuedCancelled": 5,
"batches": ["batch-1709856234567", "batch-1709856234568"]
}
Get Batch Status
Retrieve the current status of a batch execution including all individual workflow executions.
Endpoint
GET /api/workflows/execution/batch/{batchId}
Path Parameters
Batch execution ID returned from parallel mode execution
Example Request
curl http://localhost:3003/api/workflows/execution/batch/batch-1709856234567
Response
Batch status: running, completed, error, stopped
Source type: folder, files, or workflows
Folder path (if sourceType is folder)
Total number of workflows in batch
Number of completed workflows
Number of currently running workflows
Number of queued workflows
Number of failed workflows
Unix timestamp (milliseconds) when batch started
Unix timestamp (milliseconds) when batch completed (null if still running)
Array of execution details for each workflow in batch
{
"batchId": "batch-1709856234567",
"status": "running",
"sourceType": "folder",
"folderPath": "./tests/workflows/sample",
"totalWorkflows": 5,
"completed": 2,
"running": 2,
"queued": 1,
"failed": 0,
"startTime": 1709856234567,
"endTime": null,
"executions": [
{
"executionId": "exec-1709856234567-1",
"workflowFileName": "workflow1.json",
"workflowPath": "./tests/workflows/sample/workflow1.json",
"status": "completed"
},
{
"executionId": "exec-1709856234567-2",
"workflowFileName": "workflow2.json",
"workflowPath": "./tests/workflows/sample/workflow2.json",
"status": "running",
"currentNodeId": "click-3"
},
{
"executionId": "exec-1709856234567-3",
"workflowFileName": "workflow3.json",
"workflowPath": "./tests/workflows/sample/workflow3.json",
"status": "queued"
}
]
}
Get Batch History
Retrieve paginated list of batch executions with optional status filter.
Endpoint
GET /api/workflows/executions/batches
Query Parameters
Filter by status: running, completed, error, stopped
Maximum number of batches to return
Number of batches to skip (for pagination)
Example Request
# Get all batches (first 20)
curl "http://localhost:3003/api/workflows/executions/batches?limit=20&offset=0"
# Get only completed batches
curl "http://localhost:3003/api/workflows/executions/batches?status=completed&limit=20"
# Get next page
curl "http://localhost:3003/api/workflows/executions/batches?limit=20&offset=20"
Response
Total number of batches matching filter
Limit used for this request
Offset used for this request
Array of batch summary objects
{
"total": 45,
"limit": 20,
"offset": 0,
"batches": [
{
"batchId": "batch-1709856234567",
"status": "completed",
"sourceType": "folder",
"folderPath": "./tests/workflows/sample",
"totalWorkflows": 5,
"completed": 5,
"failed": 0,
"startTime": 1709856234567,
"endTime": 1709856245678,
"duration": 11111
},
{
"batchId": "batch-1709856123456",
"status": "completed",
"sourceType": "files",
"totalWorkflows": 3,
"completed": 2,
"failed": 1,
"startTime": 1709856123456,
"endTime": 1709856130000,
"duration": 6544
}
]
}
Stop Batch
Stop a running batch execution and cancel all queued workflows in that batch.
Endpoint
POST /api/workflows/execution/batch/{batchId}/stop
Path Parameters
Batch execution ID to stop
Example Request
curl -X POST http://localhost:3003/api/workflows/execution/batch/batch-1709856234567/stop
Response
Whether the operation succeeded
Total number of executions stopped
Number of running executions stopped
Number of queued executions cancelled
{
"success": true,
"message": "Batch stopped",
"batchId": "batch-1709856234567",
"stoppedExecutions": 5,
"runningStopped": 2,
"queuedCancelled": 3
}
Clear All Batches
Delete all batches and executions from the database. This permanently removes all historical batch and execution records.
This action cannot be undone. All batch and execution history will be permanently deleted.
Endpoint
DELETE /api/workflows/executions/batches/clear
Example Request
curl -X DELETE http://localhost:3003/api/workflows/executions/batches/clear
Response
Whether the operation succeeded
Number of batches deleted
Number of executions deleted
{
"success": true,
"message": "All batches and executions cleared",
"batchesDeleted": 45,
"executionsDeleted": 230
}
Continue Execution
Continue a paused execution (paused by breakpoint or wait node).
Endpoint
POST /api/workflows/execution/continue
Request Body
Execution ID to continue (optional). If not provided, continues most recent paused execution
Example Request
curl -X POST http://localhost:3003/api/workflows/execution/continue \
-H "Content-Type: application/json" \
-d '{
"executionId": "exec-1709856234567"
}'
Response
{
"success": true,
"message": "Execution continued"
}
Toggle Trace Logs
Enable or disable trace logs for a running execution.
Endpoint
POST /api/workflows/execution/trace-logs
Request Body
Enable or disable trace logs
Execution ID (optional). If not provided, applies to most recent execution
Example Request
curl -X POST http://localhost:3003/api/workflows/execution/trace-logs \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"executionId": "exec-1709856234567"
}'
Pause Control
Control a paused execution with various actions.
Endpoint
POST /api/workflows/execution/pause-control
Request Body
Action to perform: continue, stop, skip, continueWithoutBreakpoint
Execution ID (optional). If not provided, applies to most recent paused execution
Example Request
curl -X POST http://localhost:3003/api/workflows/execution/pause-control \
-H "Content-Type: application/json" \
-d '{
"action": "continue",
"executionId": "exec-1709856234567"
}'
Actions
Continue execution from the current breakpoint
Stop the execution completely
Skip the current node and continue with the next node
Continue execution and disable breakpoints for remaining nodes
Real-Time Updates
Use Socket.IO to receive real-time execution updates:
import { io } from 'socket.io-client';
const socket = io('http://localhost:3003');
// Listen for execution updates
socket.on('execution-update', (data) => {
console.log('Execution:', data.executionId);
console.log('Status:', data.status);
console.log('Current Node:', data.currentNodeId);
});
// Listen for batch updates
socket.on('batch-update', (data) => {
console.log('Batch:', data.batchId);
console.log('Progress:', `${data.completed}/${data.totalWorkflows}`);
});
// Listen for node execution
socket.on('node-execution', (data) => {
console.log('Node:', data.nodeId);
console.log('Type:', data.nodeType);
console.log('Status:', data.status);
});