Skip to main content

Documentation index for AI agents: llms.txt. Every page here is also served as markdown: add .md to its address, or request it with Accept: text/markdown.

Alert Rules API

Configure alerting conditions and thresholds. This page lists all 5 endpoints in the Alert Rules area of the Visual Sentinel REST API.

Base URL: https://visualsentinel.com. Unless an endpoint says otherwise it accepts an API key or a session cookie, see Authentication. Most error responses use the ErrorResponse shape, see Errors and Rate limits.

Endpoints

List alert rules

GET /api/alert-rules

Get all alert rules for the organization. Each rule carries supported and unsupportedReason; unsupported rules are never evaluated.

Parameters

  • page (query, integer, optional): Default: 1.
  • limit (query, integer, optional): Default: 20.

Responses

Create alert rule

POST /api/alert-rules

Create a rule that alerts when one monitor's response time or uptime crosses a threshold. monitorId is required. Down alerts, repeated failures and SSL expiry are built-in alerts, so rules do not accept those conditions.

Request body (required): CreateAlertRuleRequest.

Responses

  • 201: Alert rule created. Body: AlertRuleResponse.
  • 400: Validation failed, or the request uses a condition alert rules do not support (status_change, consecutive_failures, ssl_expiry). Those are covered by the built-in alerts. Body: AlertRuleConditionNotSupportedResponse or ErrorResponse.
  • 404: Monitor not found in this organization.

Get alert rule

GET /api/alert-rules/{id}

Get details of a specific alert rule.

Parameters

  • id (path, string (uuid), required)

Responses

Update alert rule

PUT /api/alert-rules/{id}

Update an existing alert rule.

Parameters

  • id (path, string (uuid), required)

Request body (required): UpdateAlertRuleRequest.

Responses

  • 200: Alert rule updated. Body: AlertRuleResponse.
  • 400: Validation failed, or the request uses a condition alert rules do not support (status_change, consecutive_failures, ssl_expiry). Those are covered by the built-in alerts. Body: AlertRuleConditionNotSupportedResponse or ErrorResponse.
  • 404: Alert rule or monitor not found.

Delete alert rule

DELETE /api/alert-rules/{id}

Delete an alert rule.

Parameters

  • id (path, string (uuid), required)

Responses

  • 200: Alert rule deleted.

Data models

Request and response shapes these endpoints use: AlertRuleListResponse, CreateAlertRuleRequest, AlertRuleResponse, AlertRuleConditionNotSupportedResponse, UpdateAlertRuleRequest.

Generated from the OpenAPI 3.1 specification at https://docs.visualsentinel.com/openapi.json, the same file the interactive reference reads.