Alerts API

Alert rule configuration and management.

All endpoints are prefixed with /api/alerts. Admin only.


Endpoints

MethodPathDescription
GET/alerts/configGet alert configuration
POST/alerts/configSave alert configuration
GET/alerts/rulesList alert rules
POST/alerts/rulesCreate alert rule
PUT/alerts/rules/:idUpdate alert rule
DELETE/alerts/rules/:idDelete alert rule

Request/Response

GET /alerts/config

{
  "enabled": true,
  "emailNotifications": true,
  "notificationEmail": "admin@example.com",
  "checkInterval": 300
}

Alert Rule

{
  "id": "alert_1690000000000",
  "name": "High CPU Usage",
  "metric": "cpu",
  "condition": "greater_than",
  "threshold": 90,
  "duration": 300,
  "enabled": true,
  "actions": ["notification", "email"]
}

Part of NexusPanel API Reference

← Back to Documentation