Alerts are resources that describe who should be notified (and after how long) when the quailty of an endpoint/sentry/probe is below a defined threshold.
Field | Description |
---|---|
id | An integer that uniquely identifies the alert |
user_id | The user to which this alert belongs. |
first_alert_delay | The number of minutes after which the first alert notification is sent. |
alert_delay | The number of minute between subsequent alert notifications. |
emails | Array of email addresses. |
created_at | The date and time the alert was created. |
deleted_at | The date and time the alert was cancelled. If null, then the alert has not been cancelled. |
endpoint_ids | Array of endpoint IDs to which this alert is assigned. |
sentry_ids | Array of sentry IDs to which this alert is assigned. |
probe_ids | Array of probe IDs to which this alert is assigned. |
{
"id": 32196,
"user_id": 2,
"first_alert_delay": 30,
"alert_delay": 90,
"emails": ["email@domain.com", "neville@neville.org"],
"created_at": "2021-11-16T12:57:07-06:00",
"deleted_at": null,
"endpoint_ids": [14481, 36011],
"sentry_ids": [1],
"probe_ids": []
}
Action | Method | URL |
---|---|---|
List your alerts | GET | /alerts |
Show alert info | GET | /alerts/<alert_id> |
Create alert | POST | /alerts |
Update alert | PATCH | /alerts/<alert_id> |
Delete/cancel alert | DELETE | /alerts/<alert_id> |
Recover a deleted alert | PATCH | /alerts/<alert_id>/activate |
GET /alerts
status | Status ("active", "cancelled") of the alerts. Default: "active". |
GET /alerts args: {"name":"david"}
{ "collection": [ { "id": 32196, "user_id": 2, "first_alert_delay": 34, "alert_delay": 56, "emails": ["hello@email.com", "email@domain.com"], "created_at": "2021-11-16T12:57:07-06:00", "deleted_at": null, "endpoint_ids": [14481, 36011], "sentry_ids": [1], "probe_ids": [] }, { "id": 32197, "user_id": 2, "first_alert_delay": 60, "alert_delay": 180, "emails": ["gary@neville.org"], "created_at": "2021-11-16T12:57:41-06:00", "deleted_at": null, "endpoint_ids": [14481], "sentry_ids": [], "probe_ids": [] }, { "id": 32638, "user_id": 2, "first_alert_delay": 15, "alert_delay": 15, "emails": ["macro@gmail.com"], "created_at": "2024-04-11T17:51:55-06:00", "deleted_at": null, "endpoint_ids": [], "sentry_ids": [], "probe_ids": [] }, ], "metadata": { "count": 3 } }
GET /alerts/<alert_id>
GET /alerts/32196
{ "id": 32196, "user_id": 2, "first_alert_delay": 34, "alert_delay": 56, "emails": ["email@domain.com", "phil@neville.org"], "created_at": "2021-11-16T12:57:07-06:00", "deleted_at": null, "endpoint_ids": [14481, 36011], "sentry_ids": [1], "probe_ids": [] }
POST /alerts
user_id | ID of the user the new alert belongs to. |
first_alert_delay | The number of minutes after which the first alert notification is sent. |
alert_delay | The number of minute between subsequent alert notifications. |
emails | Array of email addresses. |
PATCH /alerts/32196 args: { "user_id": 2, "first_alert_delay"; 30, "alert_delay"; 90, "emails[]": "email@domain.com", "emails[]": "phile@neville.com" }
{ "id": 32196, "user_id": 2, "first_alert_delay": 30, "alert_delay": 90, "emails": ["email@domain.com", "phil@neville.org"], "created_at": "2021-11-16T12:57:07-06:00", "deleted_at": null, "endpoint_ids": [14481, 36011], "sentry_ids": [1], "probe_ids": [] }
PATCH /alerts/<alert_id>
first_alert_delay | The number of minutes after which the first alert notification is sent. |
alert_delay | The number of minute between subsequent alert notifications. |
emails | Array of email addresses. |
PATCH /alerts/32196 args: { "first_alert_delay"; 10, "alert_delay"; 120 }
{ "id": 32196, "user_id": 2, "first_alert_delay": 10, "alert_delay": 120, "emails": ["email@domain.com", "phil@neville.org"], "created_at": "2021-11-16T12:57:07-06:00", "deleted_at": null, "endpoint_ids": [14481, 36011], "sentry_ids": [1], "probe_ids": [] }
DELETE /alerts/<alert_id>
Deletes a alert account. Note that the account can be recovered after this.
DELETE /alerts/32196
{ "id": 32196, "user_id": 2, "first_alert_delay": 34, "alert_delay": 56, "emails": ["email@domain.com", "phil@neville.org"], "created_at": "2021-11-16T12:57:07-06:00", "deleted_at": null, "endpoint_ids": [14481, 36011], "sentry_ids": [1], "probe_ids": [] }
PATCH /users/<user_id>/activate
PATCH /users/32196/activate
{ "id": 32196, "user_id": 2, "first_alert_delay": 34, "alert_delay": 56, "emails": ["email@domain.com", "phil@neville.org"], "created_at": "2021-11-16T12:57:07-06:00", "deleted_at": null, "endpoint_ids": [14481, 36011], "sentry_ids": [1], "probe_ids": [] }