Alerts

Replace an alert definition

put/alerts/{id}

Path parameters

idstring required

Request body

namestring required
querystring required

SPL2 query executed on the schedule.

intervalstring required

Check frequency: 30s, 1m, 5m, 15m, 1h

enabledboolean

Example request

{
  "name": "High error rate",
  "query": "level=error | stats count as errors | where errors > 100",
  "interval": "5m",
  "channels": [
    {
      "type": "webhook",
      "name": "Slack Ops",
      "config": {
        "url": "https://hooks.slack.com/services/T00/B00/xxx"
      }
    }
  ]
}

Response

Updated

Example response

{
  "data": {
    "id": "alt_xyz789",
    "interval": "5m",
    "channels": [
      {
        "type": "webhook",
        "name": "Slack Ops",
        "config": {
          "url": "https://hooks.slack.com/services/T00/B00/xxx"
        }
      }
    ]
  }
}

Changes