## CancelWorkflowExecution `automations.cancel_execution(AutomationCancelExecutionParams**kwargs) -> object` **post** `/gitpod.v1.WorkflowService/CancelWorkflowExecution` Cancels a running workflow execution. Use this method to: - Stop long-running executions - Cancel failed executions - Manage resource usage ### Examples - Cancel execution: Stops a running workflow execution. ```yaml workflowExecutionId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `workflow_execution_id: Optional[str]` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.automations.cancel_execution( workflow_execution_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response) ``` #### Response ```json {} ```