DRAGOPS
DRAGOPS
DocumentationAPI referenceExecutions

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

ParameterTypeRequiredDescription
idstringYesDeployment ID

Query parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status: success, failure, running, or dead_letter
triggeredBystringNoFilter by trigger type: manual, webhook, or schedule
pageintegerNoPage number (default: 1)
limitintegerNoItems 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

ParameterTypeRequiredDescription
idstringYesDeployment ID

Query parameters

ParameterTypeRequiredDescription
periodstringNoTime 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:

PeriodBucket size
15m1 minute
24h1 hour
7d6 hours
30d24 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

ParameterTypeRequiredDescription
idstringYesDeployment ID
runIdstringYesExecution run ID

Response

{
  "success": true,
  "data": {
    "runId": "run_def456",
    "status": "completed"
  }
}

Errors

CodeStatusDescription
NOT_FOUND404The run does not exist
INVALID_STATUS400Only 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

ParameterTypeRequiredDescription
idstringYesDeployment ID
runIdstringYesExecution run ID

Response

{
  "success": true,
  "data": {
    "runId": "run_ghi789",
    "status": "completed"
  }
}

Errors

CodeStatusDescription
NOT_FOUND404The run does not exist
DEPLOYMENT_NOT_ACTIVE400The deployment must be active to replay
NO_EVENT_DATA400The 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

ParameterTypeRequiredDescription
graphDataobjectYesThe pattern graph (nodes and edges)
nodeDefinitionsobjectYesNode definition map
tracebooleanNoEnable execution tracing
breakpointsstring[]NoNode IDs where execution pauses
pinnedNodesobjectNoPinned 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

ParameterTypeRequiredDescription
codestringYesTranspiled 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

CodeStatusDescription
504Execution timed out

On this page