{
  "openapi": "3.0.1",
  "info": {
    "title": "Easy BPM API",
    "description": "Business Process Management - REST API Documentation",
    "version": "0.0.1"
  },
  "servers": [
    {
      "url": "http://localhost:8080",
      "description": "Generated server url"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Admin Maintenance",
      "description": "Purge and archive maintenance operations"
    },
    {
      "name": "Tasks",
      "description": "Task management and completion"
    },
    {
      "name": "Documents",
      "description": "Form document upload, download, and preview"
    },
    {
      "name": "Forms",
      "description": "Form deployment and retrieval"
    },
    {
      "name": "Processes",
      "description": "Process definition and instance management"
    },
    {
      "name": "Incidents",
      "description": "Operational incident tracking and resolution"
    },
    {
      "name": "Agent Processes",
      "description": "Agentic process definition management"
    }
  ],
  "paths": {
    "/tasks/{id}/assignee": {
      "put": {
        "tags": [
          "Tasks"
        ],
        "summary": "Reassign a task",
        "description": "Admin operation to update the existing task assignee",
        "operationId": "reassignTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "object"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{id}/variables": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get process variables",
        "description": "Retrieve all variables for a process instance",
        "operationId": "getProcessVariables",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessVariable"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Processes"
        ],
        "summary": "Assign process variables",
        "description": "Create or update process variables for a process instance",
        "operationId": "assignProcessVariables",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Variables to create or update for the process instance",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignProcessVariablesRequest"
              },
              "examples": {
                "assignment-variables": {
                  "summary": "Assign primitive and nested variables",
                  "description": "assignment-variables",
                  "value": {
                    "variables": {
                      "approved": true,
                      "amount": 1250.75,
                      "currency": "EUR",
                      "requester": {
                        "id": 42,
                        "name": "Alice"
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessVariable"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{id}": {
      "put": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "updateUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/admin/users/{id}/password": {
      "put": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "resetPassword",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/admin/secrets/{id}": {
      "put": {
        "tags": [
          "admin-secret-controller"
        ],
        "operationId": "updateSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AICredentialUpdateRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AICredentialResponseDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin-secret-controller"
        ],
        "operationId": "deleteSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/admin/maintenance/retention": {
      "get": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Get data retention settings",
        "description": "Return configured data retention settings",
        "operationId": "getRetentionSettings",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DataRetentionSettingsResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Update data retention settings",
        "description": "Persist data retention settings used by scheduled cleanup",
        "operationId": "updateRetentionSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataRetentionSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DataRetentionSettingsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/groups/{id}": {
      "put": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "updateGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "deleteGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/admin/groups/{id}/users": {
      "get": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "getGroupUsers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "updateGroupUsers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupUsersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/unclaim": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Unclaim a task",
        "description": "Remove the current assignee and return the task to the available pool",
        "operationId": "unclaimTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/draft": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Save a task draft",
        "description": "Persist task variables without completing the task",
        "operationId": "saveDraft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "object"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/complete": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Complete a task",
        "description": "Mark a task as completed and provide task variables",
        "operationId": "completeTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Task completion payload including assignee and process variables",
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "examples": {
                "complete-user-task": {
                  "summary": "Complete task with decision data",
                  "description": "complete-user-task",
                  "value": {
                    "assignee": "joao",
                    "variables": {
                      "approved": true,
                      "comment": "Looks good",
                      "reviewedAt": "2026-04-15T16:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/claim": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Claim a task",
        "description": "Claim a shared/group task for the current authenticated user",
        "operationId": "claimTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/search": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Search tasks",
        "description": "Search tasks by assignee and/or status with pagination",
        "operationId": "searchTasks_1",
        "parameters": [
          {
            "name": "assignee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "COMPLETED"
              ]
            }
          },
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageTaskResponseDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Search tasks with structured filters",
        "description": "Search tasks using structured AND-combined filters with pagination and sorting",
        "operationId": "searchTasks",
        "parameters": [
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskSearchRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageTaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/processes": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get latest process definitions",
        "description": "Retrieve the latest versions of all process definitions",
        "operationId": "getLatestProcesses",
        "parameters": [
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageProcessDefinition"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Processes"
        ],
        "summary": "Deploy a process definition",
        "description": "Upload and deploy a new BPMN process definition",
        "operationId": "deploy",
        "requestBody": {
          "description": "Process definition payload in BPMN 2.0 XML format",
          "content": {
            "application/xml": {
              "schema": {
                "type": "string"
              },
              "examples": {
                "approval-process": {
                  "summary": "Simple BPMN XML approval process",
                  "description": "approval-process",
                  "value": "\n                            <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n                            <bpmn:definitions xmlns:bpmn=\"http://www.omg.org/spec/BPMN/20100524/MODEL\">\n                              <bpmn:process id=\"approval-process\" name=\"Expense approval workflow\" isExecutable=\"true\">\n                                <bpmn:startEvent id=\"start\"/>\n                                <bpmn:userTask id=\"managerReview\" name=\"Manager Review\"/>\n                                <bpmn:endEvent id=\"end\"/>\n                                <bpmn:sequenceFlow id=\"flow_start_review\" sourceRef=\"start\" targetRef=\"managerReview\"/>\n                                <bpmn:sequenceFlow id=\"flow_review_end\" sourceRef=\"managerReview\" targetRef=\"end\"/>\n                              </bpmn:process>\n                            </bpmn:definitions>\n                            "
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinition"
                }
              }
            }
          }
        }
      }
    },
    "/processes/{processId}/start": {
      "post": {
        "tags": [
          "Processes"
        ],
        "summary": "Start a process instance",
        "description": "Create and start a new instance of a process definition by processId. Optional process variables may be sent as {\"variables\":{...}} or as a direct JSON object.",
        "operationId": "startInstance",
        "parameters": [
          {
            "name": "processId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonNode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/processes/messages": {
      "post": {
        "tags": [
          "Processes"
        ],
        "summary": "Send a message",
        "description": "Send a message to trigger message-based events in running process instances",
        "operationId": "sendMessage",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "object"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{id}/stop": {
      "post": {
        "tags": [
          "Processes"
        ],
        "summary": "Stop process instance",
        "description": "Cancel an active process instance and stop further execution",
        "operationId": "stopProcessInstance",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstance"
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{id}/move-node": {
      "post": {
        "tags": [
          "Processes"
        ],
        "summary": "Move process token",
        "description": "Manually move process execution from one node to another",
        "operationId": "moveProcessNode",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Source and target node ids for manual token move",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveNodeRequest"
              },
              "examples": {
                "skip-manual-review": {
                  "summary": "Move token between nodes",
                  "description": "skip-manual-review",
                  "value": {
                    "fromNode": "manual-review",
                    "toNode": "approve-request",
                    "reason": "SLA escalation approved by supervisor"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstance"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/{id}/retry": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Retry incident",
        "description": "Retry a recoverable worker/API incident",
        "operationId": "retryIncident",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncidentRetryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/{id}/resolve": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Resolve incident",
        "description": "Mark an incident as resolved",
        "operationId": "resolveIncident",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncidentResolutionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/{id}/reopen": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Reopen incident",
        "description": "Move a resolved incident back to open",
        "operationId": "reopenIncident",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/{id}/acknowledge": {
      "post": {
        "tags": [
          "Incidents"
        ],
        "summary": "Acknowledge incident",
        "description": "Mark an open incident as acknowledged",
        "operationId": "acknowledgeIncident",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IncidentAcknowledgementRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          }
        }
      }
    },
    "/forms": {
      "get": {
        "tags": [
          "Forms"
        ],
        "summary": "Get all form versions",
        "description": "Retrieve all versions of a form by formId. The name parameter is also supported for lookup by form name.",
        "operationId": "getAllVersions",
        "parameters": [
          {
            "name": "formId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Form"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Forms"
        ],
        "summary": "Deploy a form",
        "description": "Create and deploy a new form definition",
        "operationId": "deployForm",
        "requestBody": {
          "description": "Form deployment payload containing stable formId, display name, and JSON schema",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeployFormRequest"
              },
              "examples": {
                "expense-form": {
                  "summary": "Deploy expense request form",
                  "description": "expense-form",
                  "value": {
                    "formId": "expenseRequest",
                    "name": "expense-request",
                    "schema": {
                      "type": "object",
                      "properties": {
                        "employeeId": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "number"
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "employeeId",
                        "amount"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Form"
                }
              }
            }
          }
        }
      }
    },
    "/code-tasks/upload": {
      "post": {
        "tags": [
          "code-task-controller"
        ],
        "operationId": "uploadJar",
        "parameters": [
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "jarFile"
                ],
                "type": "object",
                "properties": {
                  "jarFile": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CodeTaskJarUploadResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "tags": [
          "auth-controller"
        ],
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List documents",
        "description": "Returns document metadata list, optionally filtered by taskId",
        "operationId": "list",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentResponseDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload a document",
        "description": "Upload a file and associate it with a task, process instance and/or form field",
        "operationId": "upload",
        "parameters": [
          {
            "name": "taskId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "processInstanceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "formFieldKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/ai/credentials": {
      "get": {
        "tags": [
          "ai-credential-controller"
        ],
        "operationId": "listCredentials",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AICredentialResponseDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ai-credential-controller"
        ],
        "operationId": "createCredential",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AICredentialCreateRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AICredentialResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/agent-processes": {
      "get": {
        "tags": [
          "Agent Processes"
        ],
        "summary": "Get latest agent process definitions",
        "operationId": "listLatest",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentProcessDefinition"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agent Processes"
        ],
        "summary": "Deploy an agent process definition",
        "operationId": "deploy_1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonNode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProcessDefinition"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users": {
      "get": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "listUsers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "createUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        }
      }
    },
    "/admin/secrets": {
      "get": {
        "tags": [
          "admin-secret-controller"
        ],
        "operationId": "listSecrets",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AICredentialResponseDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin-secret-controller"
        ],
        "operationId": "createSecret",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AICredentialCreateRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AICredentialResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/admin/maintenance/retention/run": {
      "post": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Run configured retention",
        "description": "Run cleanup using configured data retention settings",
        "operationId": "runConfiguredRetention",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceCleanupSummary"
                }
              }
            }
          }
        }
      }
    },
    "/admin/maintenance/retention/preview": {
      "post": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Preview configured retention",
        "description": "Preview cleanup using configured data retention settings",
        "operationId": "previewConfiguredRetention",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceCleanupSummary"
                }
              }
            }
          }
        }
      }
    },
    "/admin/maintenance/purge-completed-tasks": {
      "post": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Purge completed tasks",
        "description": "Preview or purge completed tasks older than a cutoff date",
        "operationId": "purgeCompletedTasks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurgeCompletedTasksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceCleanupSummary"
                }
              }
            }
          }
        }
      }
    },
    "/admin/maintenance/purge-completed-instances": {
      "post": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Purge completed instances",
        "description": "Preview or purge completed process instances older than a cutoff date",
        "operationId": "purgeCompletedInstances",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurgeCompletedInstancesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceCleanupSummary"
                }
              }
            }
          }
        }
      }
    },
    "/admin/groups": {
      "get": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "listGroups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GroupResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin-security-controller"
        ],
        "operationId": "createGroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tasks": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Get all tasks",
        "description": "Retrieve all tasks with pagination",
        "operationId": "getTasks",
        "parameters": [
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageTaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Get task by ID",
        "description": "Retrieve a specific task by its ID",
        "operationId": "getTaskById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get process instances",
        "description": "Retrieve all process instances with pagination",
        "operationId": "getProcessInstances",
        "parameters": [
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageProcessInstance"
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{parentId}/children/{childId}/mapping": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get call activity mapping",
        "description": "Retrieve input/output variable mapping for a parent-child call activity relationship",
        "operationId": "getCallActivityMapping",
        "parameters": [
          {
            "name": "parentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "childId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CallActivityMappingResponse"
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{id}": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get process instance by ID",
        "description": "Retrieve a specific process instance by its ID",
        "operationId": "getProcessInstanceById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstance"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Processes"
        ],
        "summary": "Delete process instance",
        "description": "Hard delete a process instance and related runtime data",
        "operationId": "deleteProcessInstance",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/processes/instances/{id}/timeline": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get process instance timeline",
        "description": "Retrieve chronological runtime events for a process instance",
        "operationId": "getProcessInstanceTimeline",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessInstanceEvent"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{id}/parent": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get parent process instance",
        "description": "Retrieve the parent instance for a subprocess instance",
        "operationId": "getParentInstance",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessInstance"
                }
              }
            }
          }
        }
      }
    },
    "/processes/instances/{id}/children": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get child process instances",
        "description": "Retrieve all subprocess instances spawned by the given parent instance",
        "operationId": "getChildInstances",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcessInstance"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/processes/definitions/{id}": {
      "get": {
        "tags": [
          "Processes"
        ],
        "summary": "Get process definition by ID",
        "description": "Retrieve a specific deployed process definition version by its ID",
        "operationId": "getProcessDefinitionById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessDefinition"
                }
              }
            }
          }
        }
      }
    },
    "/incidents": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "List incidents",
        "description": "Retrieve incidents with optional status, source, and process instance filters",
        "operationId": "getIncidents",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "OPEN",
                "ACKNOWLEDGED",
                "RESOLVED"
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PROCESS_ENGINE",
                "WORKER",
                "CODE_TASK",
                "AI_TASK",
                "MESSAGE"
              ]
            }
          },
          {
            "name": "processInstanceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageIncident"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/{id}": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "Get incident by ID",
        "description": "Retrieve a single incident",
        "operationId": "getIncident",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/{id}/events": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "Get incident timeline",
        "description": "Retrieve lifecycle events for an incident",
        "operationId": "getIncidentEvents",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IncidentEvent"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/incidents/summary": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "Get incident summary",
        "description": "Retrieve dashboard counts for incident operations",
        "operationId": "getSummary",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentSummaryResponse"
                }
              }
            }
          }
        }
      }
    },
    "/incidents/process-instances/{processInstanceId}": {
      "get": {
        "tags": [
          "Incidents"
        ],
        "summary": "Get incidents for process instance",
        "description": "Retrieve all incidents attached to a process instance",
        "operationId": "getIncidentsForProcessInstance",
        "parameters": [
          {
            "name": "processInstanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Incident"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/forms/{id}": {
      "get": {
        "tags": [
          "Forms"
        ],
        "summary": "Get form by ID",
        "description": "Retrieve a specific form by its ID",
        "operationId": "getById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Form"
                }
              }
            }
          }
        }
      }
    },
    "/forms/latest": {
      "get": {
        "tags": [
          "Forms"
        ],
        "summary": "Get latest form version",
        "description": "Retrieve the latest version of a form by formId. The name parameter is also supported for lookup by form name.",
        "operationId": "getLatest",
        "parameters": [
          {
            "name": "formId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/Form"
                }
              }
            }
          }
        }
      }
    },
    "/forms/latest-list": {
      "get": {
        "tags": [
          "Forms"
        ],
        "summary": "Get latest form definitions",
        "description": "Retrieve the latest version of each deployed form",
        "operationId": "getLatestForms",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Form"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/code-tasks/jar/{jarId}/classes": {
      "get": {
        "tags": [
          "code-task-controller"
        ],
        "operationId": "getJarClasses",
        "parameters": [
          {
            "name": "jarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/JarClassesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/code-tasks/jar/{jarId}/classes/{className}/methods": {
      "get": {
        "tags": [
          "code-task-controller"
        ],
        "operationId": "getClassMethods",
        "parameters": [
          {
            "name": "jarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "className",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ClassMetadataResponse"
                }
              }
            }
          }
        }
      }
    },
    "/code-tasks/executions": {
      "get": {
        "tags": [
          "code-task-controller"
        ],
        "operationId": "getExecutions",
        "parameters": [
          {
            "name": "instanceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionAuditPageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "tags": [
          "auth-controller"
        ],
        "operationId": "me",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUserResponse"
                }
              }
            }
          }
        }
      }
    },
    "/auth/config": {
      "get": {
        "tags": [
          "auth-controller"
        ],
        "operationId": "config",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AuthProviderConfigResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/me": {
      "get": {
        "tags": [
          "user-controller"
        ],
        "operationId": "me_1",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUserResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/documents/{id}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get document metadata",
        "description": "Returns document metadata without binary content",
        "operationId": "getMetadata",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResponseDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Delete a document",
        "description": "Permanently deletes a stored document",
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/documents/{id}/preview": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Preview a document inline",
        "description": "Returns the document content inline (suitable for PDF embed). Falls back to attachment for non-PDF types.",
        "operationId": "preview",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    },
    "/api/documents/{id}/download": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Download a document",
        "description": "Returns the document content as an attachment",
        "operationId": "download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    },
    "/ai/credentials/{id}": {
      "get": {
        "tags": [
          "ai-credential-controller"
        ],
        "operationId": "getCredential",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AICredentialResponseDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ai-credential-controller"
        ],
        "operationId": "deleteCredential",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/ai/credentials/{id}/valid": {
      "get": {
        "tags": [
          "ai-credential-controller"
        ],
        "operationId": "isCredentialValid",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ai/credentials/available": {
      "get": {
        "tags": [
          "ai-credential-controller"
        ],
        "operationId": "listAvailableCredentials",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AICredentialResponseDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agent-processes/{key}": {
      "get": {
        "tags": [
          "Agent Processes"
        ],
        "summary": "Get latest agent process definition by key",
        "operationId": "getLatest_1",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProcessDefinition"
                }
              }
            }
          }
        }
      }
    },
    "/agent-processes/{key}/versions": {
      "get": {
        "tags": [
          "Agent Processes"
        ],
        "summary": "Get all versions for an agent process key",
        "operationId": "getVersions",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentProcessDefinition"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/maintenance/process-definitions/{id}": {
      "delete": {
        "tags": [
          "Admin Maintenance"
        ],
        "summary": "Delete process definition",
        "description": "Delete a process definition and all related runtime data",
        "operationId": "deleteProcessDefinition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceCleanupSummary"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TaskResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "processInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "nodeId": {
            "type": "string"
          },
          "assignee": {
            "type": "string"
          },
          "candidateUsers": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "candidateGroups": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "COMPLETED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "formDbId": {
            "type": "integer",
            "format": "int64"
          },
          "formId": {
            "type": "string"
          },
          "variables": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          }
        }
      },
      "AssignProcessVariablesRequest": {
        "type": "object",
        "properties": {
          "variables": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "description": "Map of variable names to values. Supports primitive and nested JSON values.",
              "example": {
                "approved": true,
                "amount": 1250.75,
                "requester": {
                  "id": 42,
                  "name": "Alice"
                }
              }
            },
            "description": "Map of variable names to values. Supports primitive and nested JSON values.",
            "example": {
              "approved": true,
              "amount": 1250.75,
              "requester": {
                "id": 42,
                "name": "Alice"
              }
            }
          }
        }
      },
      "JsonNode": {
        "type": "object"
      },
      "ProcessVariable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "processInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/JsonNode"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UpdateUserRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "groupIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "permissionCodes": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UserResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "username": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "groups": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ResetPasswordRequest": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          }
        }
      },
      "AICredentialUpdateRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "providerId": {
            "type": "string"
          },
          "credentialType": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AICredentialResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "providerId": {
            "type": "string"
          },
          "credentialType": {
            "type": "string"
          },
          "maskedToken": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "lastUsedAt": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateDataRetentionSettingsRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "completedProcessRetentionDays": {
            "type": "integer",
            "format": "int64"
          },
          "completedTaskRetentionDays": {
            "type": "integer",
            "format": "int64"
          },
          "batchSize": {
            "type": "integer",
            "format": "int32"
          },
          "cron": {
            "type": "string"
          }
        }
      },
      "DataRetentionSettingsResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "completedProcessRetentionDays": {
            "type": "integer",
            "format": "int64"
          },
          "completedTaskRetentionDays": {
            "type": "integer",
            "format": "int64"
          },
          "batchSize": {
            "type": "integer",
            "format": "int32"
          },
          "cron": {
            "type": "string"
          }
        }
      },
      "UpdateGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "permissionCodes": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GroupResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateGroupUsersRequest": {
        "type": "object",
        "properties": {
          "userIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "TaskSearchFilterDto": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string",
            "enum": [
              "EQUALS",
              "NOT_EQUALS",
              "IN",
              "NOT_IN",
              "GREATER_THAN",
              "GREATER_THAN_OR_EQUAL",
              "LESS_THAN",
              "LESS_THAN_OR_EQUAL",
              "CONTAINS",
              "STARTS_WITH",
              "ENDS_WITH"
            ]
          },
          "value": {
            "type": "object"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "scope": {
            "type": "string",
            "enum": [
              "TASK",
              "PROCESS"
            ]
          },
          "name": {
            "type": "string"
          }
        }
      },
      "TaskSearchRequestDto": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskSearchFilterDto"
            }
          }
        }
      },
      "Pageable": {
        "type": "object",
        "properties": {
          "page": {
            "minimum": 0,
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PageTaskResponseDto": {
        "type": "object",
        "properties": {
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskResponseDto"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "PageableObject": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "paged": {
            "type": "boolean"
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "unpaged": {
            "type": "boolean"
          }
        }
      },
      "SortObject": {
        "type": "object",
        "properties": {
          "empty": {
            "type": "boolean"
          },
          "sorted": {
            "type": "boolean"
          },
          "unsorted": {
            "type": "boolean"
          }
        }
      },
      "ProcessDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "definitionJson": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "processName": {
            "type": "string"
          },
          "definitionXml": {
            "type": "string"
          }
        }
      },
      "ProcessInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "processDefinition": {
            "$ref": "#/components/schemas/ProcessDefinition"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "WAITING",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "currentNode": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nodeHistory": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errorMessage": {
            "type": "string"
          },
          "errorNodeId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "parentInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "callActivityNodeId": {
            "type": "string"
          },
          "nestingLevel": {
            "type": "integer",
            "format": "int32"
          },
          "completionNodeId": {
            "type": "string"
          }
        }
      },
      "MoveNodeRequest": {
        "type": "object",
        "properties": {
          "fromNode": {
            "type": "string",
            "description": "Current node id where the token is located",
            "example": "manual-review"
          },
          "toNode": {
            "type": "string",
            "description": "Target node id where the token should move",
            "example": "approve-request"
          },
          "reason": {
            "type": "string",
            "description": "Business reason for manual intervention",
            "example": "SLA escalation approved by supervisor"
          }
        }
      },
      "IncidentRetryRequest": {
        "type": "object",
        "properties": {
          "requestedBy": {
            "type": "string"
          }
        }
      },
      "Incident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "processInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "nodeId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "ACKNOWLEDGED",
              "RESOLVED"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "PROCESS_ENGINE",
              "WORKER",
              "CODE_TASK",
              "AI_TASK",
              "MESSAGE"
            ]
          },
          "message": {
            "type": "string"
          },
          "technicalDetails": {
            "type": "string"
          },
          "externalReferenceId": {
            "type": "string"
          },
          "occurrenceCount": {
            "type": "integer",
            "format": "int32"
          },
          "lastOccurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledgedAt": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledgedBy": {
            "type": "string"
          },
          "resolvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "resolvedBy": {
            "type": "string"
          },
          "resolutionNote": {
            "type": "string"
          },
          "resolutionAction": {
            "type": "string",
            "enum": [
              "RESOLVED_MANUALLY",
              "VARIABLE_FIXED",
              "RETRIED_SUCCESSFULLY",
              "IGNORED_KNOWN_ISSUE",
              "INSTANCE_CANCELLED"
            ]
          }
        }
      },
      "IncidentResolutionRequest": {
        "type": "object",
        "properties": {
          "resolvedBy": {
            "type": "string"
          },
          "resolutionNote": {
            "type": "string"
          },
          "resolutionAction": {
            "type": "string",
            "enum": [
              "RESOLVED_MANUALLY",
              "VARIABLE_FIXED",
              "RETRIED_SUCCESSFULLY",
              "IGNORED_KNOWN_ISSUE",
              "INSTANCE_CANCELLED"
            ]
          }
        }
      },
      "IncidentAcknowledgementRequest": {
        "type": "object",
        "properties": {
          "acknowledgedBy": {
            "type": "string"
          }
        }
      },
      "DeployFormRequest": {
        "type": "object",
        "properties": {
          "formId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "schema": {
            "$ref": "#/components/schemas/JsonNode"
          }
        }
      },
      "Form": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "formId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "schema": {
            "$ref": "#/components/schemas/JsonNode"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CodeTaskJarUploadResponse": {
        "type": "object",
        "properties": {
          "jarId": {
            "type": "integer",
            "format": "int64"
          },
          "fileName": {
            "type": "string"
          },
          "fileHash": {
            "type": "string"
          },
          "uploadedAt": {
            "type": "string"
          },
          "classCount": {
            "type": "integer",
            "format": "int32"
          },
          "methodCount": {
            "type": "integer",
            "format": "int32"
          },
          "classes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LoginRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "groups": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DocumentResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "fileSize": {
            "type": "integer",
            "format": "int64"
          },
          "taskId": {
            "type": "integer",
            "format": "int64"
          },
          "processInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "formFieldKey": {
            "type": "string"
          },
          "uploadedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AICredentialCreateRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "providerId": {
            "type": "string"
          },
          "credentialType": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AgentProcessDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          },
          "definitionJson": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "key": {
            "type": "string"
          },
          "processName": {
            "type": "string"
          }
        }
      },
      "CreateUserRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "groupIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "permissionCodes": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MaintenanceCleanupSummary": {
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "processDefinitionsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "processInstancesDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "tasksDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "processVariablesDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "taskVariablesDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "documentsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "messageSubscriptionsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "workerRequestsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "codeTaskExecutionsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "incidentsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "incidentEventsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "timelineEventsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "callActivityMappingsDeleted": {
            "type": "integer",
            "format": "int32"
          },
          "candidateInstanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "candidateTaskIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "PurgeCompletedTasksRequest": {
        "type": "object",
        "properties": {
          "completedBefore": {
            "type": "string",
            "format": "date-time"
          },
          "batchSize": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          }
        }
      },
      "PurgeCompletedInstancesRequest": {
        "type": "object",
        "properties": {
          "completedBefore": {
            "type": "string",
            "format": "date-time"
          },
          "processDefinitionId": {
            "type": "integer",
            "format": "int64"
          },
          "processKey": {
            "type": "string"
          },
          "batchSize": {
            "type": "integer",
            "format": "int32"
          },
          "dryRun": {
            "type": "boolean"
          }
        }
      },
      "CreateGroupRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissionCodes": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PageProcessDefinition": {
        "type": "object",
        "properties": {
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessDefinition"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "PageProcessInstance": {
        "type": "object",
        "properties": {
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessInstance"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "CallActivityMappingResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "parentInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "childInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "callActivityNodeId": {
            "type": "string"
          },
          "inputMappings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "outputMappings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "propagateAllVariables": {
            "type": "boolean"
          }
        }
      },
      "ProcessInstanceEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "processInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "nodeId": {
            "type": "string"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "PROCESS_STARTED",
              "NODE_ENTERED",
              "TASK_CREATED",
              "TASK_CLAIMED",
              "TASK_COMPLETED",
              "WORKER_REQUESTED",
              "WORKER_COMPLETED",
              "WORKER_FAILED",
              "MESSAGE_WAITING",
              "MESSAGE_RECEIVED",
              "MESSAGE_THROWN",
              "AGENT_PROCESS_STARTED",
              "AGENT_PROCESS_COMPLETED",
              "TIMER_WAITING",
              "TIMER_TRIGGERED",
              "GATEWAY_EVALUATED",
              "MANUAL_MOVE",
              "INCIDENT_CREATED",
              "INCIDENT_RETRY_REQUESTED",
              "INCIDENT_RESOLVED",
              "PROCESS_COMPLETED",
              "PROCESS_FAILED",
              "PROCESS_CANCELLED"
            ]
          },
          "message": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "details": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PageIncident": {
        "type": "object",
        "properties": {
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Incident"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "IncidentEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "incidentId": {
            "type": "integer",
            "format": "int64"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "CREATED",
              "OCCURRED_AGAIN",
              "ACKNOWLEDGED",
              "RESOLVED",
              "REOPENED",
              "RETRY_REQUESTED"
            ]
          },
          "message": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IncidentSummaryResponse": {
        "type": "object",
        "properties": {
          "openIncidents": {
            "type": "integer",
            "format": "int64"
          },
          "criticalIncidents": {
            "type": "integer",
            "format": "int64"
          },
          "acknowledgedIncidents": {
            "type": "integer",
            "format": "int64"
          },
          "incidentsCreatedToday": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "JarClassesResponse": {
        "type": "object",
        "properties": {
          "jarId": {
            "type": "integer",
            "format": "int64"
          },
          "fileName": {
            "type": "string"
          },
          "classes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ClassMetadataResponse": {
        "type": "object",
        "properties": {
          "className": {
            "type": "string"
          },
          "methods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MethodMetadataResponse"
            }
          }
        }
      },
      "MethodMetadataResponse": {
        "type": "object",
        "properties": {
          "methodName": {
            "type": "string"
          },
          "returnType": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parameterNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "static": {
            "type": "boolean"
          }
        }
      },
      "CodeTaskExecutionAuditResponse": {
        "type": "object",
        "properties": {
          "executionId": {
            "type": "integer",
            "format": "int64"
          },
          "instanceId": {
            "type": "integer",
            "format": "int64"
          },
          "nodeId": {
            "type": "string"
          },
          "jarId": {
            "type": "integer",
            "format": "int64"
          },
          "className": {
            "type": "string"
          },
          "methodName": {
            "type": "string"
          },
          "inputVariables": {
            "type": "string"
          },
          "outputVariables": {
            "type": "string"
          },
          "executionTimeMs": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "executedAt": {
            "type": "string"
          }
        }
      },
      "ExecutionAuditPageResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeTaskExecutionAuditResponse"
            }
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "currentPage": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CurrentUserResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "identityProvider": {
            "type": "string"
          },
          "externalIdentityId": {
            "type": "string"
          },
          "groups": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AuthProviderConfigResponse": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "oidc": {
            "$ref": "#/components/schemas/OidcAuthConfigResponse"
          }
        }
      },
      "OidcAuthConfigResponse": {
        "type": "object",
        "properties": {
          "issuerUri": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "authorizationEndpoint": {
            "type": "string"
          },
          "tokenEndpoint": {
            "type": "string"
          },
          "logoutEndpoint": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
