Alerts

Create Alert

Creates a new alert

post/api/v2/alerts

Request body

dashboardIdstring nullable
tileIdstring nullable
savedSearchIdstring nullable
groupBystring nullable
thresholdnumber required
interval'1m' | '5m' | '15m' | '30m' | '1h' | '6h' | '12h' | '1d' required
source'tile' | 'saved_search' required
thresholdType'above' | 'below' required
namestring nullable
messagestring nullable

Example request

{
  "dashboardId": "65f5e4a3b9e77c001a567890",
  "tileId": "65f5e4a3b9e77c001a901234",
  "savedSearchId": "65f5e4a3b9e77c001a345678",
  "groupBy": "ServiceName",
  "threshold": 100,
  "interval": "1h",
  "source": "tile",
  "thresholdType": "above",
  "channel": {
    "type": "webhook",
    "webhookId": "65f5e4a3b9e77c001a789012"
  },
  "name": "Test Alert",
  "message": "Test Alert Message"
}

Response

Successfully created alert

Example response

{
  "data": {
    "id": "65f5e4a3b9e77c001a123456",
    "name": "High Error Rate",
    "message": "Error rate exceeds threshold",
    "threshold": 100,
    "interval": "15m",
    "thresholdType": "above",
    "source": "tile",
    "state": "ALERT",
    "channel": {
      "type": "webhook",
      "webhookId": "65f5e4a3b9e77c001a789012"
    },
    "team": "65f5e4a3b9e77c001a345678",
    "tileId": "65f5e4a3b9e77c001a901234",
    "dashboard": "65f5e4a3b9e77c001a567890",
    "createdAt": "2023-01-01T00:00:00.000Z",
    "updatedAt": "2023-01-01T00:00:00.000Z"
  }
}

Changes