Suspend an AgentIdentity (recoverable).
(
agent_id: str,
db: Annotated[AsyncSession, Depends(get_db)],
)
| 331 | description="Suspend an AgentIdentity (recoverable via /reactivate).", |
| 332 | ) |
| 333 | async def suspend_identity( |
| 334 | agent_id: str, |
| 335 | db: Annotated[AsyncSession, Depends(get_db)], |
| 336 | ) -> AgentIdentityOut: |
| 337 | """Suspend an AgentIdentity (recoverable).""" |
| 338 | svc = AgentIdentityService(db) |
| 339 | try: |
| 340 | return await svc.suspend(agent_id) |
| 341 | except ValueError as e: |
| 342 | raise HTTPException(status_code=404, detail=str(e)) |
| 343 | |
| 344 | |
| 345 | @_identity.post( |
nothing calls this directly
no test coverage detected