Alerts API
Alerts allow you to alert your end users when a metric reaches a specified threshold. Composer API endpoints can be used to create, update, and delete alert definitions, each describing an alert condition, the schedule by which it is evaluated, and how notification is handled when the alert condition is met.
This is an experimental feature.
API support for alerting is performed using the REST API endpoint /api/alerts
, as described below.
Endpoint | Method | Description |
---|---|---|
/api/alerts/<alertId> | GET | Returns a specific alert definition, identified by its ID. |
/api/alerts/<alertId> | PUT | Updates a specific alert definition, identified by its ID. This completely replaces the previous version of the alert definition. |
/api/alerts/<alertId> | DELETE | Deletes a specific alert definition, identified by its ID. |
/api/alerts/<alertId> | PATCH | Patches a specific alert definition, identified by its ID. |
/api/alerts/<alertId>/evaluate-condition | POST | Evaluates an alert condition in a specific alert definition. No notification is sent, but the server responds with a payload property conditionSatisfied set to true (when the condition is satisfied) or false (when the condition is not satisfied). |
/api/alerts | GET | Returns all alert definitions. |
/api/alerts | POST | Creates a new alert. This endpoint requires the experimental ROLE_CREATE_ALERT privilege. The general request body object structure required by this endpoint is described in Alert Definition Object Structure. See Alert Definition Examples for complete examples of alert definitions. |
API documentation is provided with your Composer installation at this link: https://<composer-URL>/composer/swagger-ui.html
.
Comments
0 comments
Please sign in to leave a comment.