Evaluates the rule now instead of waiting for the scheduler. If the result changes the state, the rule moves to triggered or ok, an alert event is recorded and the alert_triggered or alert_resolved notification is sent. This works on disabled rules too.
Request#
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Alert ID, for example alert_3f9a1c7e2b8d4a6f0e1c5b92. |
The body is ignored.
Example request#
curl -X POST https://api.tried.com.au/alerts/alert_3f9a1c7e2b8d4a6f0e1c5b92/evaluate \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/alerts/alert_3f9a1c7e2b8d4a6f0e1c5b92/evaluate", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const result = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/alerts/alert_3f9a1c7e2b8d4a6f0e1c5b92/evaluate",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
result = res.json()Response#
200 OK
{
"value": 1720,
"current": 1720,
"previous": null,
"breached": true,
"transition": "triggered",
"alert": {
"alert_id": "alert_3f9a1c7e2b8d4a6f0e1c5b92",
"name": "High p90 latency",
"metric": "e2e_latency_p90",
"threshold_type": "absolute",
"comparator": ">",
"threshold": 1500,
"window_minutes": 60,
"frequency_minutes": 5,
"agent_ids": [
"agent_4b7e2c9a1f3d5e8b0c6a2d1f"
],
"emails": [
"ops@example.com"
],
"webhook_url": "https://example.com/hooks/alerts",
"enabled": true,
"state": "triggered",
"last_value": 1720,
"last_checked_timestamp": 1792398600000,
"created_timestamp": 1792395000000
}
}| Field | Type | Description |
|---|---|---|
value |
number | Value compared against the threshold. For a relative rule, the percent change from previous to current. |
current |
number | Metric value over the last window_minutes. |
previous |
number or null | Metric value over the window before that, for relative rules. null for absolute rules. |
breached |
boolean | Whether value meets the comparator and threshold. |
transition |
string or null | triggered, resolved, or null when the state did not change. |
alert |
object | The rule after the check, with the new state, last_value and last_checked_timestamp. |
Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the analytics scope. Dashboard users with the member role get The member role is read-only. |
404 |
No alert with that ID in the workspace: Alert <id> not found. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.
Retell compatibility#
Retell's public API reference has no alerting endpoints, so this route has no Retell SDK equivalent.