#230 OpenAPI: Replay & Debugging Endpoints (7 endpoints)
Description
Edit## Scope
Document replay and debugging endpoints:
- `api/blueprints/v1/replay.py` (3 endpoints)
- `api/blueprints/v1/circuit_breakers.py` (4 endpoints)
## Replay Endpoints (3)
1. GET /workflows/{id}/replay - Get replay data
- Query: format (text|json), verbose, include_children
2. POST /workflows/{id}/simulate - Run simulation
- Body: resume_from (step name)
3. GET /workflows/{id}/replay/steps - List checkpoints
## Circuit Breakers Endpoints (4)
1. GET /circuit-breakers - List circuit breakers
2. GET /circuit-breakers/{name} - Get circuit breaker state
3. POST /circuit-breakers/{name}/reset - Reset circuit breaker
4. GET /circuit-breakers/stats - Get circuit breaker stats
## Pydantic Models
```python
class ReplayData(BaseModel):
run_metadata: dict
task_params: dict
checkpoints: dict
audit_log: list[dict]
run_result: Any
class SimulationRequest(BaseModel):
resume_from: str | None = None
class SimulationReport(BaseModel):
status: str # success, failed, diverged
simulation_status: str
workflow_run_id: str
executed_steps: list[str]
divergences: list[dict]
replay_logs: list[str]
original_result: Any
simulated_result: Any
class CircuitBreakerState(BaseModel):
name: str
state: str # closed, open, half_open
failure_count: int
last_failure: datetime | None
cooldown_until: datetime | None
```
## Depends On
- #224 (Infrastructure Setup)
## Acceptance Criteria
- [ ] All 7 endpoints documented
- [ ] Simulation workflow explained
- [ ] Circuit breaker states documented
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...