{
  "openapi": "3.0.3",
  "info": {
    "title": "Workflows API",
    "version": "1.0.0",
    "description": "REST API for automation workflows \u2014 definitions, runs, schedules, steps, the code IDE, and the SDK reference."
  },
  "servers": [
    {
      "url": "https://versus-demo.com"
    }
  ],
  "paths": {
    "/api/backout-runs/": {
      "get": {
        "operationId": "backout_runs_list",
        "parameters": [
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "run",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "cancelled",
                "completed",
                "failed",
                "running",
                "waiting_approval",
                "waiting_dual_approval",
                "waiting_primary_approval"
              ]
            },
            "description": "* `waiting_primary_approval` - Waiting for Primary Approval\n* `waiting_dual_approval` - Waiting for Dual Approval\n* `waiting_approval` - Waiting for Step Approval\n* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `cancelled` - Cancelled"
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedBackoutRunListList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List backout runs"
      }
    },
    "/api/backout-runs/{id}/": {
      "get": {
        "operationId": "backout_runs_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve backout run"
      }
    },
    "/api/backout-runs/{id}/approve_dual/": {
      "post": {
        "operationId": "backout_runs_approve_dual_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Approve dual: backout run"
      }
    },
    "/api/backout-runs/{id}/approve_primary/": {
      "post": {
        "operationId": "backout_runs_approve_primary_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Approve primary: backout run"
      }
    },
    "/api/backout-runs/{id}/cancel/": {
      "post": {
        "operationId": "backout_runs_cancel_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Cancel: backout run"
      }
    },
    "/api/backout-runs/{id}/steps/{step_id}/acknowledge/": {
      "post": {
        "operationId": "backout_runs_steps_acknowledge_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          },
          {
            "in": "path",
            "name": "step_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Acknowledge: step"
      }
    },
    "/api/backout-runs/{id}/steps/{step_id}/approve/": {
      "post": {
        "operationId": "backout_runs_steps_approve_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          },
          {
            "in": "path",
            "name": "step_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Approve: step"
      }
    },
    "/api/backout-runs/{id}/steps/{step_id}/retry/": {
      "post": {
        "operationId": "backout_runs_steps_retry_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          },
          {
            "in": "path",
            "name": "step_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retry: step"
      }
    },
    "/api/backout-runs/{id}/steps/{step_id}/skip/": {
      "post": {
        "operationId": "backout_runs_steps_skip_create",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this backout run.",
            "required": true
          },
          {
            "in": "path",
            "name": "step_id",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "backout-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/BackoutRunRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackoutRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Skip: step"
      }
    },
    "/api/quick-run-script/": {
      "post": {
        "operationId": "quick_run_script_create",
        "description": "POST { script, name?, context_vars? }\nCreates an ephemeral WorkflowDefinition with a single python_script step\nand immediately kicks it off. Returns { run_id, workflow_id }.\nThe created workflow persists so the run log is accessible; delete it\nafterwards if you want a truly throwaway run.",
        "tags": [
          "quick-run-script"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create quick run script"
      }
    },
    "/api/workflow-ai-generate/": {
      "post": {
        "operationId": "workflow_ai_generate_create",
        "description": "POST { prompt, answers? }\n-> 200 { id, name, description, category, node_count, edge_count }\n-> 202 { needs_clarification: true, questions: [...] }\n-> 400/500 { error }",
        "tags": [
          "workflow-ai-generate"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create workflow ai generate"
      }
    },
    "/api/workflow-ai-snow-fill/": {
      "post": {
        "operationId": "workflow_ai_snow_fill_create",
        "description": "POST { workflow_name, nodes: [{key, label, kind}] }\n-> 200 { short_description, description, justification,\n         pre_validation, implementation_plan, post_validation }\n\nUses AI to generate ServiceNow change request field content\nbased on what the workflow steps actually do.",
        "tags": [
          "workflow-ai-snow-fill"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create workflow ai snow fill"
      }
    },
    "/api/workflow-code/assist/": {
      "post": {
        "operationId": "workflow_code_assist_create",
        "description": "POST /api/workflow-code/assist \u2014 unified AI code editor (generate/complete/\nexplain/refactor/fix). refactor & fix return a `diff`.",
        "tags": [
          "workflow-code"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create assist"
      }
    },
    "/api/workflow-http-assist/": {
      "post": {
        "operationId": "workflow_http_assist_create",
        "description": "POST { prompt, existing_code? }\n\u2192 { code }\n\nCalls Claude with the http object reference and common API patterns,\nreturns Python code for the HTTP Request step.",
        "tags": [
          "workflow-http-assist"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create workflow http assist"
      }
    },
    "/api/workflow-playbook-assist/": {
      "post": {
        "operationId": "workflow_playbook_assist_create",
        "description": "POST { prompt, existing_playbook? }\n\u2192 { playbook }\n\nCalls Claude with Ansible + Versus SDK context and returns YAML.",
        "tags": [
          "workflow-playbook-assist"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create workflow playbook assist"
      }
    },
    "/api/workflow-runs/": {
      "get": {
        "operationId": "workflow_runs_list",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "query",
            "name": "device_group",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "cancelled",
                "completed",
                "failed",
                "paused",
                "pending",
                "running",
                "waiting_approval"
              ]
            },
            "description": "* `pending` - Pending\n* `running` - Running\n* `waiting_approval` - Waiting for Approval\n* `paused` - Paused\n* `completed` - Completed\n* `failed` - Failed\n* `cancelled` - Cancelled"
          },
          {
            "in": "query",
            "name": "workflow",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workflow__category",
            "schema": {
              "type": "string",
              "enum": [
                "certificate",
                "consolidation",
                "dns",
                "f5",
                "firewall",
                "general",
                "migration",
                "netscaler",
                "network",
                "servicenow",
                "vsphere"
              ]
            },
            "description": "* `netscaler` - NetScaler\n* `f5` - F5 BIG-IP\n* `certificate` - Certificate Management\n* `dns` - DNS\n* `firewall` - Firewall\n* `network` - Router / Switch\n* `servicenow` - ServiceNow\n* `migration` - ADC Migration\n* `vsphere` - VMware vSphere\n* `consolidation` - F5 rSeries Consolidation\n* `general` - General"
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWorkflowRunListList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List workflow runs"
      }
    },
    "/api/workflow-runs/{id}/": {
      "get": {
        "operationId": "workflow_runs_retrieve",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve workflow run"
      }
    },
    "/api/workflow-runs/{id}/backout/": {
      "get": {
        "operationId": "workflow_runs_backout_retrieve",
        "description": "Retrieve an existing back-out for this run (if any).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Backout: workflow run"
      }
    },
    "/api/workflow-runs/{id}/cancel/": {
      "post": {
        "operationId": "workflow_runs_cancel_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Cancel: workflow run"
      }
    },
    "/api/workflow-runs/{id}/code-breakpoints/": {
      "post": {
        "operationId": "workflow_runs_code_breakpoints_create",
        "description": "Set/replace this run's code breakpoints ({node_id: [line, ...]}) before launch.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Code breakpoints: workflow run"
      }
    },
    "/api/workflow-runs/{id}/debug/": {
      "post": {
        "operationId": "workflow_runs_debug_create",
        "description": "Drive the paused debugger: command in {step, step_over, continue, stop}. DB-polled,\nso it reaches the paused script no matter which gunicorn worker handles this request.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Debug: workflow run"
      }
    },
    "/api/workflow-runs/{id}/frame/": {
      "get": {
        "operationId": "workflow_runs_frame_retrieve",
        "description": "The current paused code-debugger frame for this run (line + locals).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Frame: workflow run"
      }
    },
    "/api/workflow-runs/{id}/mark_complete/": {
      "post": {
        "operationId": "workflow_runs_mark_complete_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Mark complete: workflow run"
      }
    },
    "/api/workflow-runs/{id}/pause/": {
      "post": {
        "operationId": "workflow_runs_pause_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Pause: workflow run"
      }
    },
    "/api/workflow-runs/{id}/request_backout/": {
      "post": {
        "operationId": "workflow_runs_request_backout_create",
        "description": "Create a back-out plan for this run.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Request backout: workflow run"
      }
    },
    "/api/workflow-runs/{id}/resume/": {
      "post": {
        "operationId": "workflow_runs_resume_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Resume: workflow run"
      }
    },
    "/api/workflow-runs/{id}/resume_approval/": {
      "post": {
        "operationId": "workflow_runs_resume_approval_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Resume approval: workflow run"
      }
    },
    "/api/workflow-runs/{id}/resume_failed/": {
      "post": {
        "operationId": "workflow_runs_resume_failed_create",
        "description": "Resume a failed run from the last node it was attempting.\nUsed when the failure was at the orchestration level (e.g. device-role\nresolution) rather than inside a step, so there is no per-step Retry\nbutton to click.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Resume failed: workflow run"
      }
    },
    "/api/workflow-runs/{id}/retry_step/": {
      "post": {
        "operationId": "workflow_runs_retry_step_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retry step: workflow run"
      }
    },
    "/api/workflow-runs/{id}/stop_step/": {
      "post": {
        "operationId": "workflow_runs_stop_step_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow run.",
            "required": true
          }
        ],
        "tags": [
          "workflow-runs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunDetailRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunDetail"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Stop step: workflow run"
      }
    },
    "/api/workflow-schedules/": {
      "get": {
        "operationId": "workflow_schedules_list",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "query",
            "name": "enabled",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workflow",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWorkflowScheduleList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List workflow schedules"
      },
      "post": {
        "operationId": "workflow_schedules_create",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "tags": [
          "workflow-schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Create workflow schedule"
      }
    },
    "/api/workflow-schedules/{id}/": {
      "get": {
        "operationId": "workflow_schedules_retrieve",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve workflow schedule"
      },
      "put": {
        "operationId": "workflow_schedules_update",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update workflow schedule"
      },
      "patch": {
        "operationId": "workflow_schedules_partial_update",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkflowScheduleRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkflowScheduleRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkflowScheduleRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update workflow schedule"
      },
      "delete": {
        "operationId": "workflow_schedules_destroy",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "summary": "Delete workflow schedule"
      }
    },
    "/api/workflow-schedules/{id}/disable/": {
      "post": {
        "operationId": "workflow_schedules_disable_create",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Disable: workflow schedule"
      }
    },
    "/api/workflow-schedules/{id}/enable/": {
      "post": {
        "operationId": "workflow_schedules_enable_create",
        "description": "CRUD for workflow schedules with cron-based execution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Enable: workflow schedule"
      }
    },
    "/api/workflow-schedules/{id}/run_now/": {
      "post": {
        "operationId": "workflow_schedules_run_now_create",
        "description": "Immediately fire this schedule, ignoring next_run_at.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow schedule.",
            "required": true
          }
        ],
        "tags": [
          "workflow-schedules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Run now: workflow schedule"
      }
    },
    "/api/workflow-schedules/due/": {
      "get": {
        "operationId": "workflow_schedules_due_retrieve",
        "description": "List schedules that are currently due (for monitoring/debugging).",
        "tags": [
          "workflow-schedules"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchedule"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List dues"
      }
    },
    "/api/workflow-script-assist/": {
      "post": {
        "operationId": "workflow_script_assist_create",
        "description": "POST { prompt, existing_code? }\n\u2192 { code }\n\nCalls Claude with the Versus SDK reference as system context and\nreturns Python code for the user's custom script node.",
        "tags": [
          "workflow-script-assist"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create workflow script assist"
      }
    },
    "/api/workflow-sdk/reference/": {
      "get": {
        "operationId": "workflow_sdk_reference_retrieve",
        "description": "GET /api/workflow-sdk/reference?language=python \u2014 live-introspected SDK\nreference (powers autocomplete + grounds the assist prompt).",
        "tags": [
          "workflow-sdk"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "List references"
      }
    },
    "/api/workflow-status/{run_id}/": {
      "get": {
        "operationId": "workflow_status_retrieve",
        "description": "GET /api/workflow-status/<run_id>/\n\nReturns the full execution state of a workflow run, structured as sections\nand steps, with AI-generated resolution guidance for any failed steps.\n\nQuery params:\n    with_ai=true    \u2014 include AI resolution suggestions (default: true)\n\nResponse:\n{\n    \"run_id\": 42,\n    \"run_name\": \"...\",\n    \"workflow\": \"NetScaler Upgrade\",\n    \"device_group\": \"ns-pair-1\",\n    \"status\": \"failed\",          // pending|running|waiting_approval|paused|completed|failed|cancelled\n    \"started_by\": \"api\",\n    \"created_at\": \"...\",\n    \"started_at\": \"...\",\n    \"finished_at\": \"...\",\n    \"duration_seconds\": 183,\n    \"progress\": {\"completed\": 7, \"total\": 12, \"percent\": 58},\n    \"current_step\": \"Install Code\",\n    \"error\": \"...\",              // run-level error if executor crashed\n    \"sections\": [\n        {\n            \"label\": \"Pre-Upgrade Checks\",\n            \"steps\": [\n                {\n                    \"label\": \"Save Config\",\n                    \"status\": \"success\",\n                    \"pending\": false,\n                    \"devices\": [\n                        {\"name\": \"ns1\", \"status\": \"success\", \"duration_seconds\": 4, ...},\n                        {\"name\": \"ns2\", \"status\": \"success\", \"duration_seconds\": 3, ...}\n                    ],\n                    \"started_at\": \"...\",\n                    \"finished_at\": \"...\",\n                    \"duration_seconds\": 4,\n                    \"requires_intervention\": false\n                }\n            ]\n        }\n    ],\n    \"interventions_required\": [\n        {\n            \"label\": \"Install Code\",\n            \"device\": \"ns2\",\n            \"step_run_id\": 17,\n            \"error_snippet\": \"...\",\n            \"ai_resolution\": {\n                \"severity\": \"high\",\n                \"summary\": \"...\",\n                \"recommended_actions\": [\"...\", \"...\"],\n                \"safe_to_retry\": true,\n                \"caution\": null\n            },\n            \"actions\": {\n                \"retry\":         {\"url\": \"/api/workflow-runs/42/retry_step/\",    \"body\": {\"step_run_id\": 17}},\n                \"mark_complete\": {\"url\": \"/api/workflow-runs/42/mark_complete/\", \"body\": {\"step_run_id\": 17}}\n            }\n        }\n    ]\n}",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "workflow-status"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Retrieve workflow statu"
      }
    },
    "/api/workflow-steps/": {
      "get": {
        "operationId": "workflow_steps_retrieve",
        "description": "Lists every built-in step so the canvas can build its node palette and config forms.",
        "tags": [
          "workflow-steps"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "List workflow steps"
      }
    },
    "/api/workflow-steps/{key}/source/": {
      "get": {
        "operationId": "workflow_steps_source_retrieve",
        "description": "Read-only view of a built-in step's actual implementation \u2014 the\nnode inspector's \"Implementation\" panel calls this on demand rather\nthan the always-loaded step registry, since some steps (e.g.\npalo_upgrade.py) run well past a thousand lines. Returns the class\nbody via inspect.getsource() \u2014 always exactly what's really\nregistered and running, never a separately maintained copy.",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "workflow-steps"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Source: workflow step"
      }
    },
    "/api/workflow-trigger/": {
      "post": {
        "operationId": "workflow_trigger_create",
        "description": "POST /api/workflow-trigger/\n\nTrigger a workflow by human-readable identifiers.\n\nRequest body (JSON):\n{\n    \"workflow\":           \"NetScaler Upgrade\", // workflow name or slug (case-insensitive)\n    \"device_group\":       \"ns-pair-1\",         // DeviceGroup name (case-insensitive)\n    \"firmware_version\":   \"13.5.0\",            // FirmwareImage.version to pass as context (optional)\n    \"vendor\":             \"netscaler\",         // filter firmware by vendor (optional, inferred from workflow)\n    \"run_name\":           \"Nightly upgrade\",   // optional \u2014 auto-generated if omitted\n    \"stop_after_section\": 0,                   // optional int: pause after completing section N (0-based)\n    \"context\":            {}                   // any extra workflow context vars (optional)\n}\n\nResponse 201:\n{\n    \"run_id\": 42,\n    \"status\": \"pending\",\n    \"status_url\": \"/api/workflow-status/42/\"\n}",
        "tags": [
          "workflow-trigger"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No response body"
          }
        },
        "summary": "Create workflow trigger"
      }
    },
    "/api/workflows/": {
      "get": {
        "operationId": "workflows_list",
        "parameters": [
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "string",
              "enum": [
                "certificate",
                "consolidation",
                "dns",
                "f5",
                "firewall",
                "general",
                "migration",
                "netscaler",
                "network",
                "servicenow",
                "vsphere"
              ]
            },
            "description": "* `netscaler` - NetScaler\n* `f5` - F5 BIG-IP\n* `certificate` - Certificate Management\n* `dns` - DNS\n* `firewall` - Firewall\n* `network` - Router / Switch\n* `servicenow` - ServiceNow\n* `migration` - ADC Migration\n* `vsphere` - VMware vSphere\n* `consolidation` - F5 rSeries Consolidation\n* `general` - General"
          },
          {
            "in": "query",
            "name": "is_active",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "slug",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowDefinitionList"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List workflows"
      },
      "post": {
        "operationId": "workflows_create",
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Create workflow"
      }
    },
    "/api/workflows/{id}/": {
      "get": {
        "operationId": "workflows_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve workflow"
      },
      "put": {
        "operationId": "workflows_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update workflow"
      },
      "patch": {
        "operationId": "workflows_partial_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkflowDefinitionRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update workflow"
      },
      "delete": {
        "operationId": "workflows_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "summary": "Delete workflow"
      }
    },
    "/api/workflows/{id}/duplicate/": {
      "post": {
        "operationId": "workflows_duplicate_create",
        "description": "Clones this workflow's graph into a new, editable (non-builtin)\nWorkflowDefinition \u2014 the supported way to customize a built-in\nworkflow without editing it in place.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Duplicate: workflow"
      }
    },
    "/api/workflows/{id}/favorite/": {
      "post": {
        "operationId": "workflows_favorite_create",
        "description": "Toggle the current user's favorite state for this workflow.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Favorite: workflow"
      }
    },
    "/api/workflows/{id}/finalize/": {
      "post": {
        "operationId": "workflows_finalize_create",
        "description": "Promote a published version to the canonical final \u2014 production runs pin to it.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Finalize: workflow"
      }
    },
    "/api/workflows/{id}/preflight/": {
      "post": {
        "operationId": "workflows_preflight_create",
        "description": "Dry trace: validate, then run a dry_run that records what WOULD run \u2014 no device IO.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Preflight: workflow"
      }
    },
    "/api/workflows/{id}/publish/": {
      "post": {
        "operationId": "workflows_publish_create",
        "description": "Freeze the working draft into an immutable published version (hard-gated on validation).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Publish: workflow"
      }
    },
    "/api/workflows/{id}/revert_draft/": {
      "post": {
        "operationId": "workflows_revert_draft_create",
        "description": "Copy a version's frozen graph back onto the working draft.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Revert draft: workflow"
      }
    },
    "/api/workflows/{id}/run/": {
      "post": {
        "operationId": "workflows_run_create",
        "description": "Create a WorkflowRun and kick off execution in a background thread.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Run: workflow"
      }
    },
    "/api/workflows/{id}/sections/": {
      "get": {
        "operationId": "workflows_sections_retrieve",
        "description": "The workflow's high-level 'section' nodes, in execution order.\n\nVersus Desk seeds a Change's steps (ChangeTask rows) from the\nworkflow the change will run \u2014 one task per section. A section is a\nnode with ``kind == 'section'`` in the graph JSON (a pure logical\ngrouping the executor skips over). We return them ordered the way the\nengine would reach them: a walk from the ``start`` node following\nedges, falling back to node-array order for anything not reached.\n\n``GET /api/workflows/{id}/sections/`` \u2192\n``[{id, label, order, description}]``",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Sections: workflow"
      }
    },
    "/api/workflows/{id}/validate/": {
      "get": {
        "operationId": "workflows_validate_retrieve",
        "description": "Static validation of the working draft graph (advisory; also the publish gate).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Validate: workflow"
      },
      "post": {
        "operationId": "workflows_validate_create",
        "description": "Static validation of the working draft graph (advisory; also the publish gate).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Validate: workflow"
      }
    },
    "/api/workflows/{id}/versions/": {
      "get": {
        "operationId": "workflows_versions_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Versions: workflow"
      }
    },
    "/api/workflows/{id}/versions/diff/": {
      "get": {
        "operationId": "workflows_versions_diff_retrieve",
        "description": "Structured graph diff between two refs (?from=&to=); a ref is a version_no or 'draft'.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this workflow definition.",
            "required": true
          }
        ],
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinition"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Diff: version"
      }
    }
  },
  "components": {
    "schemas": {
      "BackoutRunRequest": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/Status96aEnum"
          },
          "requested_by": {
            "type": "string",
            "maxLength": 150
          },
          "approved_by": {
            "type": "string",
            "maxLength": 150
          },
          "dual_approved_by": {
            "type": "string",
            "maxLength": 150
          },
          "approved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dual_approved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "error": {
            "type": "string"
          },
          "snow_updated": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "WorkflowSchedule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "description": {
            "type": "string"
          },
          "workflow": {
            "type": "integer"
          },
          "workflow_name": {
            "type": "string",
            "readOnly": true
          },
          "enabled": {
            "type": "boolean"
          },
          "cron_expression": {
            "type": "string",
            "description": "Standard 5-field cron: minute hour dom month dow. Examples: \"0 2 * * *\" = daily at 02:00 UTC; \"0 6 * * 1\" = every Monday 06:00 UTC; \"*/15 * * * *\" = every 15 minutes",
            "maxLength": 100
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone, e.g. \"UTC\" or \"America/New_York\"",
            "maxLength": 60
          },
          "context_template": {
            "description": "Variables passed into the workflow context at run time"
          },
          "device_group": {
            "type": "integer",
            "nullable": true,
            "description": "Device group to run against (leave blank for device-less workflows)"
          },
          "device_group_name": {
            "type": "string",
            "readOnly": true,
            "nullable": true
          },
          "max_runtime_minutes": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Timeout in minutes \u2014 triggers \"timeout\" notification event"
          },
          "notify_on": {
            "description": "List of events: [\"start\", \"success\", \"failure\", \"complete\", \"timeout\"]"
          },
          "notify_slack_source": {
            "type": "integer",
            "nullable": true,
            "description": "Slack workspace to notify (leave blank to disable Slack notifications)"
          },
          "slack_source_name": {
            "type": "string",
            "readOnly": true,
            "nullable": true
          },
          "notify_slack_channel": {
            "type": "string",
            "description": "Override channel for this schedule (uses source default_channel if blank)",
            "maxLength": 200
          },
          "notify_pager_source": {
            "type": "integer",
            "nullable": true,
            "description": "On-call platform to notify (only triggered for failure/timeout events)"
          },
          "pager_source_name": {
            "type": "string",
            "readOnly": true,
            "nullable": true
          },
          "notify_pager_severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotifyPagerSeverityEnum"
              }
            ],
            "description": "Severity when paging on failure\n\n* `critical` - Critical\n* `error` - Error\n* `warning` - Warning\n* `info` - Info"
          },
          "notify_emails": {
            "type": "string",
            "description": "Comma-separated email addresses (requires EMAIL_HOST in settings)"
          },
          "last_run_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "next_run_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true,
            "description": "Pre-computed next fire time (UTC)"
          },
          "last_run_status": {
            "type": "string",
            "readOnly": true
          },
          "last_run_id": {
            "type": "integer",
            "readOnly": true,
            "nullable": true
          },
          "run_count": {
            "type": "integer",
            "readOnly": true
          },
          "consecutive_failures": {
            "type": "integer",
            "readOnly": true
          },
          "created_by": {
            "type": "string",
            "maxLength": 100
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "consecutive_failures",
          "created_at",
          "device_group_name",
          "id",
          "last_run_at",
          "last_run_id",
          "last_run_status",
          "name",
          "next_run_at",
          "pager_source_name",
          "run_count",
          "slack_source_name",
          "updated_at",
          "workflow",
          "workflow_name"
        ]
      },
      "BackoutStepStatusEnum": {
        "enum": [
          "pending",
          "waiting_approval",
          "approved",
          "running",
          "success",
          "failed",
          "skipped",
          "acknowledged"
        ],
        "type": "string",
        "description": "* `pending` - Pending\n* `waiting_approval` - Waiting for Approval\n* `approved` - Approved\n* `running` - Running\n* `success` - Success\n* `failed` - Failed\n* `skipped` - Skipped\n* `acknowledged` - Acknowledged"
      },
      "BackoutRunList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "run_id": {
            "type": "integer",
            "readOnly": true
          },
          "run_name": {
            "type": "string",
            "readOnly": true
          },
          "workflow_name": {
            "type": "string",
            "readOnly": true
          },
          "status": {
            "$ref": "#/components/schemas/Status96aEnum"
          },
          "requested_by": {
            "type": "string",
            "maxLength": 150
          },
          "approved_by": {
            "type": "string",
            "maxLength": 150
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "error": {
            "type": "string"
          },
          "step_count": {
            "type": "string",
            "readOnly": true
          },
          "reversible_count": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "requested_at",
          "reversible_count",
          "run_id",
          "run_name",
          "step_count",
          "workflow_name"
        ]
      },
      "WorkflowDefinitionList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "maxLength": 220,
            "pattern": "^[-a-zA-Z0-9_]+$"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/CategoryEa3Enum"
          },
          "is_builtin": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "run_count": {
            "type": "string",
            "readOnly": true
          },
          "is_favorited": {
            "type": "boolean",
            "readOnly": true,
            "default": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "is_favorited",
          "name",
          "run_count",
          "slug",
          "updated_at"
        ]
      },
      "NotifyPagerSeverityEnum": {
        "enum": [
          "critical",
          "error",
          "warning",
          "info"
        ],
        "type": "string",
        "description": "* `critical` - Critical\n* `error` - Error\n* `warning` - Warning\n* `info` - Info"
      },
      "WorkflowDefinitionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 220,
            "pattern": "^[-a-zA-Z0-9_]+$"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/CategoryEa3Enum"
          },
          "is_active": {
            "type": "boolean"
          },
          "production": {
            "type": "boolean",
            "description": "Production workflows require dual approval before a back-out can run."
          },
          "backout_window_hours": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Hours after run completion during which a back-out may be requested."
          },
          "graph": {},
          "created_by": {
            "type": "string",
            "maxLength": 100
          },
          "lifecycle_enabled": {
            "type": "boolean"
          },
          "draft_dirty": {
            "type": "boolean"
          },
          "current_version": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "name",
          "slug"
        ]
      },
      "WorkflowScheduleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string"
          },
          "workflow": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "cron_expression": {
            "type": "string",
            "minLength": 1,
            "description": "Standard 5-field cron: minute hour dom month dow. Examples: \"0 2 * * *\" = daily at 02:00 UTC; \"0 6 * * 1\" = every Monday 06:00 UTC; \"*/15 * * * *\" = every 15 minutes",
            "maxLength": 100
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "description": "IANA timezone, e.g. \"UTC\" or \"America/New_York\"",
            "maxLength": 60
          },
          "context_template": {
            "description": "Variables passed into the workflow context at run time"
          },
          "device_group": {
            "type": "integer",
            "nullable": true,
            "description": "Device group to run against (leave blank for device-less workflows)"
          },
          "max_runtime_minutes": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Timeout in minutes \u2014 triggers \"timeout\" notification event"
          },
          "notify_on": {
            "description": "List of events: [\"start\", \"success\", \"failure\", \"complete\", \"timeout\"]"
          },
          "notify_slack_source": {
            "type": "integer",
            "nullable": true,
            "description": "Slack workspace to notify (leave blank to disable Slack notifications)"
          },
          "notify_slack_channel": {
            "type": "string",
            "description": "Override channel for this schedule (uses source default_channel if blank)",
            "maxLength": 200
          },
          "notify_pager_source": {
            "type": "integer",
            "nullable": true,
            "description": "On-call platform to notify (only triggered for failure/timeout events)"
          },
          "notify_pager_severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotifyPagerSeverityEnum"
              }
            ],
            "description": "Severity when paging on failure\n\n* `critical` - Critical\n* `error` - Error\n* `warning` - Warning\n* `info` - Info"
          },
          "notify_emails": {
            "type": "string",
            "description": "Comma-separated email addresses (requires EMAIL_HOST in settings)"
          },
          "created_by": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "name",
          "workflow"
        ]
      },
      "WorkflowRunList": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "workflow": {
            "type": "integer"
          },
          "workflow_name": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 250
          },
          "status": {
            "$ref": "#/components/schemas/StatusE9fEnum"
          },
          "device_group": {
            "type": "integer",
            "nullable": true
          },
          "device_group_name": {
            "type": "string",
            "readOnly": true
          },
          "current_node_id": {
            "type": "string",
            "maxLength": 100
          },
          "started_by": {
            "type": "string",
            "maxLength": 100
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "step_count": {
            "type": "string",
            "readOnly": true
          },
          "step_summary": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "device_group_name",
          "id",
          "step_count",
          "step_summary",
          "workflow",
          "workflow_name"
        ]
      },
      "WorkflowRunDetailModeEnum": {
        "enum": [
          "live",
          "dry_run",
          "lab"
        ],
        "type": "string",
        "description": "* `live` - Live\n* `dry_run` - Dry run\n* `lab` - Lab test"
      },
      "WorkflowRunDetailRequest": {
        "type": "object",
        "properties": {
          "workflow": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "maxLength": 250
          },
          "status": {
            "$ref": "#/components/schemas/StatusE9fEnum"
          },
          "pause_requested": {
            "type": "boolean"
          },
          "device_group": {
            "type": "integer",
            "nullable": true
          },
          "context": {},
          "current_node_id": {
            "type": "string",
            "maxLength": 100
          },
          "error": {
            "type": "string"
          },
          "started_by": {
            "type": "string",
            "maxLength": 100
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "mode": {
            "$ref": "#/components/schemas/WorkflowRunDetailModeEnum"
          },
          "version": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "workflow"
        ]
      },
      "WorkflowStepRunStatusEnum": {
        "enum": [
          "pending",
          "running",
          "success",
          "failed",
          "skipped",
          "waiting_approval"
        ],
        "type": "string",
        "description": "* `pending` - Pending\n* `running` - Running\n* `success` - Success\n* `failed` - Failed\n* `skipped` - Skipped\n* `waiting_approval` - Waiting for Approval"
      },
      "PatchedWorkflowScheduleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string"
          },
          "workflow": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "cron_expression": {
            "type": "string",
            "minLength": 1,
            "description": "Standard 5-field cron: minute hour dom month dow. Examples: \"0 2 * * *\" = daily at 02:00 UTC; \"0 6 * * 1\" = every Monday 06:00 UTC; \"*/15 * * * *\" = every 15 minutes",
            "maxLength": 100
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "description": "IANA timezone, e.g. \"UTC\" or \"America/New_York\"",
            "maxLength": 60
          },
          "context_template": {
            "description": "Variables passed into the workflow context at run time"
          },
          "device_group": {
            "type": "integer",
            "nullable": true,
            "description": "Device group to run against (leave blank for device-less workflows)"
          },
          "max_runtime_minutes": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Timeout in minutes \u2014 triggers \"timeout\" notification event"
          },
          "notify_on": {
            "description": "List of events: [\"start\", \"success\", \"failure\", \"complete\", \"timeout\"]"
          },
          "notify_slack_source": {
            "type": "integer",
            "nullable": true,
            "description": "Slack workspace to notify (leave blank to disable Slack notifications)"
          },
          "notify_slack_channel": {
            "type": "string",
            "description": "Override channel for this schedule (uses source default_channel if blank)",
            "maxLength": 200
          },
          "notify_pager_source": {
            "type": "integer",
            "nullable": true,
            "description": "On-call platform to notify (only triggered for failure/timeout events)"
          },
          "notify_pager_severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotifyPagerSeverityEnum"
              }
            ],
            "description": "Severity when paging on failure\n\n* `critical` - Critical\n* `error` - Error\n* `warning` - Warning\n* `info` - Info"
          },
          "notify_emails": {
            "type": "string",
            "description": "Comma-separated email addresses (requires EMAIL_HOST in settings)"
          },
          "created_by": {
            "type": "string",
            "maxLength": 100
          }
        }
      },
      "WorkflowDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "run_input_schema": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "maxLength": 220,
            "pattern": "^[-a-zA-Z0-9_]+$"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/CategoryEa3Enum"
          },
          "is_builtin": {
            "type": "boolean",
            "readOnly": true
          },
          "is_active": {
            "type": "boolean"
          },
          "production": {
            "type": "boolean",
            "description": "Production workflows require dual approval before a back-out can run."
          },
          "backout_window_hours": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Hours after run completion during which a back-out may be requested."
          },
          "graph": {},
          "created_by": {
            "type": "string",
            "maxLength": 100
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "lifecycle_enabled": {
            "type": "boolean"
          },
          "draft_dirty": {
            "type": "boolean"
          },
          "current_version": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "created_at",
          "id",
          "is_builtin",
          "name",
          "run_input_schema",
          "slug",
          "updated_at"
        ]
      },
      "StatusE9fEnum": {
        "enum": [
          "pending",
          "running",
          "waiting_approval",
          "paused",
          "completed",
          "failed",
          "cancelled"
        ],
        "type": "string",
        "description": "* `pending` - Pending\n* `running` - Running\n* `waiting_approval` - Waiting for Approval\n* `paused` - Paused\n* `completed` - Completed\n* `failed` - Failed\n* `cancelled` - Cancelled"
      },
      "BackoutStep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "step_key": {
            "type": "string",
            "maxLength": 150
          },
          "label": {
            "type": "string",
            "maxLength": 250
          },
          "order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "reversible": {
            "type": "string",
            "readOnly": true
          },
          "reverse_description": {
            "type": "string",
            "readOnly": true
          },
          "status": {
            "$ref": "#/components/schemas/BackoutStepStatusEnum"
          },
          "approved_by": {
            "type": "string",
            "maxLength": 150
          },
          "approved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "log": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "original_step_label": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "original_step_label",
          "reverse_description",
          "reversible"
        ]
      },
      "BackoutRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "run_id": {
            "type": "integer",
            "readOnly": true
          },
          "run_name": {
            "type": "string",
            "readOnly": true
          },
          "workflow_name": {
            "type": "string",
            "readOnly": true
          },
          "production": {
            "type": "boolean",
            "readOnly": true
          },
          "status": {
            "$ref": "#/components/schemas/Status96aEnum"
          },
          "requested_by": {
            "type": "string",
            "maxLength": 150
          },
          "approved_by": {
            "type": "string",
            "maxLength": 150
          },
          "dual_approved_by": {
            "type": "string",
            "maxLength": 150
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "approved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dual_approved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "error": {
            "type": "string"
          },
          "snow_updated": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BackoutStep"
            },
            "readOnly": true
          }
        },
        "required": [
          "id",
          "production",
          "requested_at",
          "run_id",
          "run_name",
          "steps",
          "workflow_name"
        ]
      },
      "Status96aEnum": {
        "enum": [
          "waiting_primary_approval",
          "waiting_dual_approval",
          "waiting_approval",
          "running",
          "completed",
          "failed",
          "cancelled"
        ],
        "type": "string",
        "description": "* `waiting_primary_approval` - Waiting for Primary Approval\n* `waiting_dual_approval` - Waiting for Dual Approval\n* `waiting_approval` - Waiting for Step Approval\n* `running` - Running\n* `completed` - Completed\n* `failed` - Failed\n* `cancelled` - Cancelled"
      },
      "PaginatedWorkflowScheduleList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowSchedule"
            }
          }
        }
      },
      "WorkflowRunDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "workflow": {
            "type": "integer"
          },
          "workflow_name": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 250
          },
          "status": {
            "$ref": "#/components/schemas/StatusE9fEnum"
          },
          "pause_requested": {
            "type": "boolean"
          },
          "device_group": {
            "type": "integer",
            "nullable": true
          },
          "device_group_name": {
            "type": "string",
            "readOnly": true
          },
          "context": {},
          "current_node_id": {
            "type": "string",
            "maxLength": 100
          },
          "error": {
            "type": "string"
          },
          "started_by": {
            "type": "string",
            "maxLength": 100
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "step_runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowStepRun"
            },
            "readOnly": true
          },
          "graph": {
            "type": "string",
            "readOnly": true
          },
          "mode": {
            "$ref": "#/components/schemas/WorkflowRunDetailModeEnum"
          },
          "version": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "created_at",
          "device_group_name",
          "graph",
          "id",
          "step_runs",
          "workflow",
          "workflow_name"
        ]
      },
      "PaginatedBackoutRunListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BackoutRunList"
            }
          }
        }
      },
      "WorkflowStepRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "device_name": {
            "type": "string",
            "readOnly": true
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "node_id": {
            "type": "string",
            "maxLength": 100
          },
          "step_key": {
            "type": "string",
            "maxLength": 150
          },
          "label": {
            "type": "string",
            "maxLength": 250
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStepRunStatusEnum"
          },
          "order": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "log": {
            "type": "string"
          },
          "output": {},
          "pre_state": {
            "nullable": true
          },
          "approved_by": {
            "type": "string",
            "maxLength": 100
          },
          "approved_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "approval_comment": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "context_snapshot": {
            "nullable": true
          },
          "simulated": {
            "type": "boolean"
          },
          "traceback": {
            "type": "string"
          },
          "call_trace": {},
          "debug_frame": {
            "nullable": true
          },
          "debug_command": {
            "type": "string",
            "maxLength": 12
          },
          "run": {
            "type": "integer"
          },
          "device": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "device_name",
          "id",
          "node_id",
          "run"
        ]
      },
      "PaginatedWorkflowRunListList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowRunList"
            }
          }
        }
      },
      "CategoryEa3Enum": {
        "enum": [
          "netscaler",
          "f5",
          "certificate",
          "dns",
          "firewall",
          "network",
          "servicenow",
          "migration",
          "vsphere",
          "consolidation",
          "general"
        ],
        "type": "string",
        "description": "* `netscaler` - NetScaler\n* `f5` - F5 BIG-IP\n* `certificate` - Certificate Management\n* `dns` - DNS\n* `firewall` - Firewall\n* `network` - Router / Switch\n* `servicenow` - ServiceNow\n* `migration` - ADC Migration\n* `vsphere` - VMware vSphere\n* `consolidation` - F5 rSeries Consolidation\n* `general` - General"
      },
      "PatchedWorkflowDefinitionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 220,
            "pattern": "^[-a-zA-Z0-9_]+$"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/CategoryEa3Enum"
          },
          "is_active": {
            "type": "boolean"
          },
          "production": {
            "type": "boolean",
            "description": "Production workflows require dual approval before a back-out can run."
          },
          "backout_window_hours": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "description": "Hours after run completion during which a back-out may be requested."
          },
          "graph": {},
          "created_by": {
            "type": "string",
            "maxLength": 100
          },
          "lifecycle_enabled": {
            "type": "boolean"
          },
          "draft_dirty": {
            "type": "boolean"
          },
          "current_version": {
            "type": "integer",
            "nullable": true
          }
        }
      }
    }
  }
}