alerts
GET
https://lucidace.com /v1/projects/{project_id}/alerts Scope insight:readParameters
project_idstringpathrequiredinsight_idstringquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/alerts"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of Alert, newest first
Example
{
"data": [
{
"channels": [
{}
],
"check_interval": "string",
"condition": {},
"created_at": "2024-01-01T00:00:00Z",
"enabled": true,
"flag_action": {},
"id": "string",
"insight_id": "string",
"last_checked_at": "2024-01-01T00:00:00Z",
"last_error": "string",
"last_value": 0,
"name": "string",
"project_id": "string",
"snoozed_until": "2024-01-01T00:00:00Z",
"state": "string"
}
],
"next_cursor": "string"
}Schema
dataAlert[]requiredShow child parameters
channelsobject[]requiredChannel list; Slack URLs are sealed and redacted by the API layer.
check_intervalstringrequiredevery_1m | every_5m | every_15m | hourly | daily | weekly | monthlyconditionobjectrequired{"op": "above|below|pct_up|pct_down|delta_up|delta_down", "threshold": f64, "hysteresis": f64, "series": int?, "breakdown": str?}created_atstringrequiredenabledbooleanrequiredflag_actionobjectFlag action run when the alert starts firing:
{flag_id, action: disable|enable|kill, environment?}.idstringrequiredinsight_idstringrequiredlast_checked_atstringlast_errorstringlast_valuenumbernamestringrequiredproject_idstringrequiredsnoozed_untilstringNotifications are suppressed until this time (evaluation continues).
statestringrequiredok | firing | errorednext_cursorstring404
DELETE
https://lucidace.com /v1/projects/{project_id}/alerts/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/alerts/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
PATCH
https://lucidace.com /v1/projects/{project_id}/alerts/{id} Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
channelsarraycheck_intervalstringevery_1m | every_5m | every_15m | hourly | daily | weekly | monthlyconditionobjectenabledbooleanflag_actionFlagActionShow child parameters
actionstringrequireddisable | enable | kill (kill sets the kill switch, overriding every condition).environmentstringEnvironment to act on; absent = the flag's base state.
flag_idstringrequirednamestringsnoozed_untilstringSuppress notifications until this time (still evaluates);
null clears the snooze.{
"channels": [
{}
],
"check_interval": "string",
"condition": {},
"enabled": true,
"flag_action": {
"action": "string",
"environment": "string",
"flag_id": "string"
},
"name": "string",
"snoozed_until": "2024-01-01T00:00:00Z"
}Code samples
cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/alerts/{id}" \
-H "Content-Type: application/json" \
-d '{"channels":[{}],"check_interval":"string","condition":{},"enabled":true,"flag_action":{"action":"string","environment":"string","flag_id":"string"},"name":"string","snoozed_until":"2024-01-01T00:00:00Z"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"channels": [
{}
],
"check_interval": "string",
"condition": {},
"created_at": "2024-01-01T00:00:00Z",
"enabled": true,
"flag_action": {},
"id": "string",
"insight_id": "string",
"last_checked_at": "2024-01-01T00:00:00Z",
"last_error": "string",
"last_value": 0,
"name": "string",
"project_id": "string",
"snoozed_until": "2024-01-01T00:00:00Z",
"state": "string"
}Schema
channelsobject[]requiredChannel list; Slack URLs are sealed and redacted by the API layer.
check_intervalstringrequiredevery_1m | every_5m | every_15m | hourly | daily | weekly | monthlyconditionobjectrequired{"op": "above|below|pct_up|pct_down|delta_up|delta_down", "threshold": f64, "hysteresis": f64, "series": int?, "breakdown": str?}created_atstringrequiredenabledbooleanrequiredflag_actionobjectFlag action run when the alert starts firing:
{flag_id, action: disable|enable|kill, environment?}.idstringrequiredinsight_idstringrequiredlast_checked_atstringlast_errorstringlast_valuenumbernamestringrequiredproject_idstringrequiredsnoozed_untilstringNotifications are suppressed until this time (evaluation continues).
statestringrequiredok | firing | errored400
403
404
GET
https://lucidace.com /v1/projects/{project_id}/alerts/{id}/events Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredtransitionsbooleanquerylimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/alerts/{id}/events"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of AlertEvent, newest first
404
POST
https://lucidace.com /v1/projects/{project_id}/insights/{id}/alerts Scope insight:writeParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
channelsobject[]required[{"type":"email","to":..}, {"type":"slack","url":..}, {"type":"webhook"}]check_intervalstringevery_1m | every_5m | every_15m | hourly | daily | weekly | monthly (default daily).conditionobjectrequiredThreshold:
{"op": "above|below|pct_up|pct_down|delta_up|delta_down", "threshold": number, "hysteresis"?: number, "series"?: int, "breakdown"?: string (a breakdown value), "breakdowns"?: [string] (one value per breakdown column, empty = any), "value_column"?: string}. delta_* compare the absolute change from the previous point. Funnel conversion in percent (steps funnel): {"kind": "funnel_conversion", "op": "below", "threshold": 20, "to_step"?: int}. Retention at period N in percent: {"kind": "retention", "op": "below", "threshold": 30, "period"?: int}. Anomaly (any trend insight): {"kind": "anomaly", "sensitivity"?: "low|medium|high"|number, "detectors"?: ["zscore|mad|iqr|iforest|knn|hbos|lof|pca|copod|ecod|ocsvm|llm"], "ensemble"?: "and|or", "series"?: int, "breakdown"?: string, "value_column"?: string}.flag_actionFlagActionShow child parameters
actionstringrequireddisable | enable | kill (kill sets the kill switch, overriding every condition).environmentstringEnvironment to act on; absent = the flag's base state.
flag_idstringrequirednamestringrequired{
"channels": [
{}
],
"check_interval": "string",
"condition": {},
"flag_action": {
"action": "string",
"environment": "string",
"flag_id": "string"
},
"name": "string"
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/insights/{id}/alerts" \
-H "Content-Type: application/json" \
-d '{"channels":[{}],"check_interval":"string","condition":{},"flag_action":{"action":"string","environment":"string","flag_id":"string"},"name":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
POST
https://lucidace.com /v1/projects/{project_id}/insights/{id}/alerts/simulate Scope insight:readParameters
project_idstringpathrequiredidstringpathrequiredRequest body
application/json
conditionobjectrequiredThe alert condition, as on create.
daysintegerDays to replay, 1 to 365 (default 30).
{
"condition": {},
"days": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/insights/{id}/alerts/simulate" \
-H "Content-Type: application/json" \
-d '{"condition":{},"days":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"days": 0,
"fires": 0,
"firing_points": 0,
"from": "2024-01-01T00:00:00Z",
"llm_skipped": true,
"points": [
{}
],
"resolves": 0,
"to": "2024-01-01T00:00:00Z"
}Schema
daysintegerrequiredfiresintegerrequiredTimes it would have fired and resolved: each is one notification.
firing_pointsintegerrequiredPoints spent firing.
fromstringrequiredllm_skippedbooleanrequiredThe
llm detector is not replayed (one model call per point); the others are.pointsobject[]requiredEvery replayed point of the window with its state.
resolvesintegerrequiredtostringrequired400
404
POST
https://lucidace.com /v1/projects/{project_id}/insights/{insight_id}/alerts/{alert_id}/check Scope insight:writeEvaluate one alert now with the scheduler's own code (state, history, notifications).
Parameters
project_idstringpathrequiredinsight_idstringpathrequiredalert_idstringpathrequiredCode samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/insights/{insight_id}/alerts/{alert_id}/check"TypeScript
Python
Go
PHP
Ruby
Java
Updated