Update Execution Status
Update execution status.
Supports setting status to ‘cancelled’, ‘failed’, or ‘completed’ for running executions. Uses PATCH with a status body for proper REST semantics.
Use cases:
- ‘cancelled’: User-initiated cancellation of a running execution
- ‘failed’: Manual cleanup of stale executions that failed but weren’t detected
- ‘completed’: Manual cleanup of stale executions that completed but weren’t detected
Note: ‘failed’ and ‘completed’ are intended for administrative cleanup of executions that got stuck in ‘running’ status (e.g., after server restart in embedded mode).
Args: execution_id: Execution UUID request: Status update request with target status and optional error_info service: Execution service (injected)
Returns: Status update result with previous and current status
Raises: HTTPException: 404 if not found, 400 if status change not allowed
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Request to update execution status.
Used with PATCH /executions/{execution_id} to change execution state. Supports setting status to ‘cancelled’, ‘failed’, or ‘completed’.
For ‘failed’ status, optional error_info can be provided with details about why the execution is being marked as failed.
Responses
Section titled “ Responses ”Successful Response
Response from updating execution status.
object
Whether update succeeded
Execution UUID
Status before update
Status after update
Status message
Resource not found
Standard error response matching FastAPI HTTPException format.
This model is used in OpenAPI response declarations for 4xx/5xx errors.
The detail field matches FastAPI’s HTTPException structure.
Validation Error