Skip to main content

Get Execution Status

Retrieve the current status of a specific workflow execution.

Endpoint

GET /api/workflows/execution/{executionId}

Path Parameters

executionId
string
required
Unique execution identifier returned from the execute endpoint

Example Request

curl http://localhost:3003/api/workflows/execution/exec-1709856234567

Response

executionId
string
required
Execution identifier
status
string
required
Execution status: idle, running, completed, error, stopped
currentNodeId
string
ID of the currently executing node
error
string
Error message if status is error
pausedNodeId
string
ID of the node where execution is paused (if paused)
pauseReason
string
Reason for pause: wait-pause, breakpoint, or null
Response Example
{
  "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

executionId
string
Execution ID (optional). If not provided, returns most recent execution status

Example Request

cURL
# 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
curl http://localhost:3003/api/workflows/executions/active

Response

totalActive
number
required
Total number of active executions
executions
array
required
Array of active execution status objects
Response Example
{
  "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

executionId
string
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

success
boolean
required
Whether the stop operation succeeded
message
string
required
Success or error message
executionId
string
ID of the stopped execution
wasRunning
boolean
Whether the execution was running when stopped
wasQueued
boolean
Whether the execution was queued when stopped
Response Example
{
  "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
curl -X POST http://localhost:3003/api/workflows/execution/stop-all

Response

success
boolean
required
Whether the operation succeeded
message
string
required
Success message
totalBatches
number
required
Total number of batches stopped
totalStopped
number
required
Total number of executions stopped
runningStopped
number
required
Number of running executions stopped
queuedCancelled
number
required
Number of queued executions cancelled
batches
array
required
Array of stopped batch IDs
Response Example
{
  "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

batchId
string
required
Batch execution ID returned from parallel mode execution

Example Request

cURL
curl http://localhost:3003/api/workflows/execution/batch/batch-1709856234567

Response

batchId
string
required
Batch identifier
status
string
required
Batch status: running, completed, error, stopped
sourceType
string
required
Source type: folder, files, or workflows
folderPath
string
Folder path (if sourceType is folder)
totalWorkflows
number
required
Total number of workflows in batch
completed
number
required
Number of completed workflows
running
number
required
Number of currently running workflows
queued
number
required
Number of queued workflows
failed
number
required
Number of failed workflows
startTime
number
required
Unix timestamp (milliseconds) when batch started
endTime
number
Unix timestamp (milliseconds) when batch completed (null if still running)
executions
array
required
Array of execution details for each workflow in batch
Response Example
{
  "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

status
string
Filter by status: running, completed, error, stopped
limit
number
default:20
Maximum number of batches to return
offset
number
default:0
Number of batches to skip (for pagination)

Example Request

cURL
# 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
required
Total number of batches matching filter
limit
number
required
Limit used for this request
offset
number
required
Offset used for this request
batches
array
required
Array of batch summary objects
Response Example
{
  "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

batchId
string
required
Batch execution ID to stop

Example Request

cURL
curl -X POST http://localhost:3003/api/workflows/execution/batch/batch-1709856234567/stop

Response

success
boolean
required
Whether the operation succeeded
message
string
required
Success message
batchId
string
required
ID of the stopped batch
stoppedExecutions
number
required
Total number of executions stopped
runningStopped
number
required
Number of running executions stopped
queuedCancelled
number
required
Number of queued executions cancelled
Response Example
{
  "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
curl -X DELETE http://localhost:3003/api/workflows/executions/batches/clear

Response

success
boolean
required
Whether the operation succeeded
message
string
required
Success message
batchesDeleted
number
required
Number of batches deleted
executionsDeleted
number
required
Number of executions deleted
Response Example
{
  "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

executionId
string
Execution ID to continue (optional). If not provided, continues most recent paused execution

Example Request

cURL
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

enabled
boolean
required
Enable or disable trace logs
executionId
string
Execution ID (optional). If not provided, applies to most recent execution

Example Request

cURL
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
string
required
Action to perform: continue, stop, skip, continueWithoutBreakpoint
executionId
string
Execution ID (optional). If not provided, applies to most recent paused execution

Example Request

cURL
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

Real-Time Updates

Use Socket.IO to receive real-time execution updates:
JavaScript
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);
});

Build docs developers (and LLMs) love