Executions
View execution history, filter runs, inspect logs, and retrieve performance metrics through the DRAGOPS API.
Executions represent individual runs of a deployed pattern. Each time a trigger fires (webhook, schedule, or manual), the system creates an execution run record with status, duration, logs, and event data.
Authentication required for all endpoints.
List execution runs
GET /api/deployments/:id/runs
Return a paginated list of execution runs for a specific deployment.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter by status: success, failure, running, or dead_letter |
triggeredBy | string | No | Filter by trigger type: manual, webhook, or schedule |
page | integer | No | Page number (default: 1) |
limit | integer | No | Items per page (default: 20, max: 100) |
Response
{
"success": true,
"data": [
{
"id": "run_abc123",
"deploymentId": "dep_abc123",
"triggeredBy": "webhook",
"status": "completed",
"startedAt": "2026-03-05T11:45:00.000Z",
"completedAt": "2026-03-05T11:45:00.320Z",
"durationMs": 320,
"eventData": {
"headers": { "content-type": "application/json" },
"body": { "action": "opened" }
},
"logOutput": [
{ "level": "info", "message": "Processing webhook payload" },
{ "level": "info", "message": "Execution complete" }
],
"errorMessage": null
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 42,
"totalPages": 3
}
}Get execution metrics
GET /api/deployments/:id/runs/stats
Return aggregated execution metrics for a deployment over a specified time period. Includes success rates, duration statistics, per-trigger breakdowns, and time-bucketed history.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Time window: 15m, 24h (default), 7d, or 30d |
Response
{
"success": true,
"data": {
"totalRuns": 134,
"successCount": 128,
"failureCount": 6,
"successRate": 95.52,
"avgDurationMs": 285,
"p95DurationMs": 1200,
"runsByTrigger": {
"webhook": 98,
"schedule": 30,
"manual": 6
},
"runsByPeriod": [
{
"bucket": "2026-03-05T00:00:00.000Z",
"count": 12,
"success": 11,
"failure": 1
},
{
"bucket": "2026-03-05T01:00:00.000Z",
"count": 8,
"success": 8,
"failure": 0
}
],
"lastRunAt": "2026-03-05T11:45:00.000Z",
"lastSuccessAt": "2026-03-05T11:45:00.000Z",
"lastFailureAt": "2026-03-05T09:12:00.000Z",
"period": "24h"
}
}The runsByPeriod array uses adaptive bucketing:
| Period | Bucket size |
|---|---|
15m | 1 minute |
24h | 1 hour |
7d | 6 hours |
30d | 24 hours |
Retry a failed run
POST /api/deployments/:id/runs/:runId/retry
Retry a failed or dead-letter execution run. This creates a new run with the same event data as the original.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
runId | string | Yes | Execution run ID |
Response
{
"success": true,
"data": {
"runId": "run_def456",
"status": "completed"
}
}Errors
| Code | Status | Description |
|---|---|---|
NOT_FOUND | 404 | The run does not exist |
INVALID_STATUS | 400 | Only failed or dead-letter runs can be retried |
Replay a run
POST /api/deployments/:id/runs/:runId/replay
Re-execute a run using its original event data. Unlike retry, replay works on runs in any terminal status and preserves the original trigger type.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Deployment ID |
runId | string | Yes | Execution run ID |
Response
{
"success": true,
"data": {
"runId": "run_ghi789",
"status": "completed"
}
}Errors
| Code | Status | Description |
|---|---|---|
NOT_FOUND | 404 | The run does not exist |
DEPLOYMENT_NOT_ACTIVE | 400 | The deployment must be active to replay |
NO_EVENT_DATA | 400 | The original run has no event data to replay |
Transpile pattern
POST /api/execute/transpile
Transpile a pattern graph into executable code without deploying it. Use this for test runs in the visual editor.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
graphData | object | Yes | The pattern graph (nodes and edges) |
nodeDefinitions | object | Yes | Node definition map |
trace | boolean | No | Enable execution tracing |
breakpoints | string[] | No | Node IDs where execution pauses |
pinnedNodes | object | No | Pinned output values for specific nodes |
{
"graphData": {
"nodes": [ ... ],
"edges": [ ... ]
},
"nodeDefinitions": { ... },
"trace": true
}Response (success)
{
"success": true,
"code": "<compiled output — pass directly to the execute endpoint>",
"runId": "550e8400-e29b-41d4-a716-446655440000",
"warnings": []
}Response (validation errors)
422 Unprocessable Entity
{
"success": false,
"errors": [
{
"nodeId": "node_1",
"message": "Input pin 'url' is not connected"
}
],
"warnings": []
}Execute code
POST /api/execute/run
Execute transpiled code on the execution engine.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Transpiled code from the transpile endpoint |
{
"code": "<compiled output from the transpile endpoint>"
}Response
{
"status": "completed",
"logs": [
{ "level": "info", "message": "Execution started" },
{ "level": "info", "message": "Hello from webhook" },
{ "level": "info", "message": "Execution completed" }
]
}Errors
| Code | Status | Description |
|---|---|---|
| — | 504 | Execution timed out |