Add task status updates (Internal API)
Add task status updates to a flow execution (Internal API).
This endpoint is used by system workers to report task execution status changes. Multiple task statuses can be added in a single request for batch efficiency. Status updates trigger state transitions and WebSocket notifications.
⚠️ Internal API: This endpoint is designed for internal system communication. Direct customer usage is not recommended. Use GET /task-executions instead.
Context: - Called by system workers during task execution - Updates task status records in bulk for performance - Triggers task output state calculations - Sends WebSocket notifications asynchronously - Worker receives immediate response without blocking on notifications
Behavior: 1. Validates flow execution exists and is accessible 2. Creates status records for each task in batch 3. Updates related task output states in parallel 4. Sends WebSocket notifications in background task 5. Returns immediately to worker for low latency
Performance Optimizations: - Batch inserts for multiple status updates (~50ms for 10 tasks) - WebSocket notifications processed asynchronously - Task output state updates use batch operations - Response returns before notification delivery completes
Use Cases: - System workers reporting task start/completion - Bulk status updates during execution - Real-time execution monitoring via WebSocket
Important Notes: - This endpoint does NOT retrieve task status (use GET /task-executions) - Requires service-level authentication token - Not intended for direct customer API integration - WebSocket notifications may arrive after HTTP response
Business Logic: - Task output states recalculated based on new statuses - Multiple status updates for same task create history - Execution-level status not automatically updated - Status transitions not validated (allows any status value)
Related Internal Endpoints: - POST /flow-executions - Creates parent execution - GET /task-executions - Retrieves task execution details - WebSocket /ws/flows/{flow_id} - Receives status notifications
Header Parameters
Path Parameters
UUID of the flow execution receiving task status updates. Must be an active (non-deleted) execution.
Body Parameters
Array of task status updates to apply. Minimum: 1 update, Maximum: 100 updates per request. Updates are processed in order provided.
Show child attributes
Response
Response Attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.
Show child attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.
Show child attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.
Show child attributes
Response Attributes
Show child attributes
Response Attributes
Standard error detail structure.
This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.