Terminate a running execution.
This endpoint forcefully terminates a running execution. The execution will be cancelled and its status will be updated to ‘cancelled’ in the database.
Args: execution_id: Execution UUID or Temporal workflow ID to terminate request: FastAPI request object (contains kubiya_token in state) terminate_request: Request body with termination reason organization: Current organization from auth db: Database session
Returns: TerminateWorkflowResponse with success status and termination timestamp
Raises: 404: Execution not found 403: Access denied (execution doesn’t belong to organization) 400: Cannot terminate execution (invalid status) 500: Failed to terminate execution via Temporal
Enter your Kubiya API token (format: Bearer
Request to terminate a running workflow
Termination reason
1 - 500