Stop Monitoring
DELETE /api/agents/monitor/{monitor_id}
Stop monitoring a specific URL.
Removes the SQLite record first (durable state), then best-effort removes from Lagan’s in-memory web_monitor. A failed Lagan-side removal is logged as a warning but does not fail the request — the durable state is already clean; the log surfaces the Lagan-side leak for investigation.
Args: monitor_id: Unique identifier of the monitor to stop.
Returns: MonitoringStopResponse with success status and monitor_id.
Raises: HTTPException 400: No active project set. HTTPException 404: Monitor ID not found in the active project. HTTPException 503: Lagan agent unavailable.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
Response after stopping a monitoring operation.
object
Whether monitor was stopped successfully
ID of stopped monitor
Status message
Validation Error