API reference
Alerts
Alert rules on app and function metrics.
GET
/v1/alertsRules and recent events#
- Credential
- An API key or a dashboard session
- Roles
- Any role
Response
200object
rulesAlertRule[]requiredidstring (uuid)requiredprojectstringrequiredkindstringmetricstringrequiredopstringrequiredthresholdnumberrequiredwindow_minintegerchannelsAlertChannelsemailbooleansmsbooleanwebhookstringbaleobjecttokenstringchatstring
eitaaobjecttokenstringchatstring
statestringrequiredone of
ok,firinglast_valuenumber | nullchanged_atstring (date-time) | null
eventsAlertEvent[]requiredrule_idstring (uuid)statestringvaluenumbersentobjectatstring (date-time)namestringmetricstring
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
Example
curl "https://api.ibel.ai/v1/alerts" \
-H "Authorization: Bearer $KEY"POST
/v1/alertsCreate a rule#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Request bodyapplication/json
projectstringrequiredkindstringone of
function,app· default"function"metricstringrequiredone of
error_rate,p95_ms,p99_ms,requestsopstringrequiredone of
>,<thresholdnumber | stringrequiredwindow_mininteger1–60 · default
5channelsAlertChannelsrequiredemailbooleansmsbooleanwebhookstringbaleobjecttokenstringchatstring
eitaaobjecttokenstringchatstring
Response
201object
idstring (uuid)required
Errors
| Status | Description |
|---|---|
| 400 | Bad request: bad_metric, bad_op, bad_threshold, bad_window, bad_webhook, no_channel, bad_json |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/alerts" \
-H "Authorization: Bearer $KEY" \
-d '{"project":"my-api","metric":"error_rate","op":">","threshold":1,"channels":{"email":true,"sms":true,"webhook":"https://example.com","bale":{"token":"…","chat":"…"},"eitaa":{"token":"…","chat":"…"}}}'DELETE
/v1/alerts/{id}Delete a rule#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
idstring (uuid)pathrequiredrule id
Response
200object
deletedboolean
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X DELETE "https://api.ibel.ai/v1/alerts/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
-H "Authorization: Bearer $KEY"POST
/v1/alerts/{id}/testSend a test notification#
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
idstring (uuid)pathrequiredrule id
Response
200object
sentobjectrequired
Errors
| Status | Description |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/alerts/88e2fe1d-6d75-4de5-8c8f-27380ec66903/test" \
-H "Authorization: Bearer $KEY"