{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-workflow-execution-schema.json",
  "title": "WorkflowExecution",
  "description": "A single workflow run.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-workflows-api-openapi.yml#/components/schemas/WorkflowExecution",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "workflow_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "waiting",
        "paused",
        "completed",
        "failed",
        "cancelled",
        "timed_out"
      ]
    },
    "trigger_type": {
      "type": "string"
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "execution_time_ms": {
      "type": [
        "integer",
        "null"
      ]
    },
    "error_message": {
      "type": [
        "string",
        "null"
      ]
    },
    "workflow_version": {
      "type": [
        "integer",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "node_executions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Composed per-node step details (present on single-execution responses)."
    }
  },
  "required": [
    "id",
    "workflow_id",
    "status",
    "created_at"
  ]
}