Skip to content

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.

monitor_id
required
Monitor Id
string

Successful Response

MonitoringStopResponse

Response after stopping a monitoring operation.

object
success
required
Success

Whether monitor was stopped successfully

boolean
monitorId
required
Monitorid

ID of stopped monitor

string
message
required
Message

Status message

string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object