vision

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-vision"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/87a487ef-8dc2-44cb-882b-0702bf05dc81/social-card.svg?v=3e7ae33eec8b" alt="vision" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/vision/alertsScope replay:read

Parameters

project_idstringpathrequired
scanner_idstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/vision/alerts"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "auto_disable_after": 0,
      "broken_reason": "string",
      "channels": [
        {}
      ],
      "cooldown_minutes": 0,
      "created_at": "2024-01-01T00:00:00Z",
      "enabled": true,
      "failures": 0,
      "id": "string",
      "kind": "string",
      "last_checked_at": "2024-01-01T00:00:00Z",
      "last_fired_at": "2024-01-01T00:00:00Z",
      "last_value": 0,
      "metric": "string",
      "name": "string",
      "of_checks": 0,
      "op": "string",
      "project_id": "string",
      "quiet_end": 0,
      "quiet_start": 0,
      "quiet_tz": "string",
      "recent_breaches": [
        true
      ],
      "required_breaches": 0,
      "scanner_id": "string",
      "score_max": 0,
      "score_min": 0,
      "snoozed_until": "2024-01-01T00:00:00Z",
      "state": "string",
      "tag": "string",
      "updated_at": "2024-01-01T00:00:00Z",
      "value": 0,
      "verdict": "string",
      "window_hours": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
auto_disable_afterintegerrequired
broken_reasonstring
channelsobject[]required
Notification channels as stored (Slack URLs sealed; redacted on the way out).
cooldown_minutesintegerrequired
created_atstringrequired
enabledbooleanrequired
failuresintegerrequired
Consecutive failed deliveries; at auto_disable_after (0 = never) the alert turns broken.
idstringrequired
kindstringrequired
match | threshold
last_checked_atstring
last_fired_atstring
last_valuenumber
metricstringrequired
threshold: count | avg_score
namestringrequired
of_checksintegerrequired
opstringrequired
threshold: gte | lte
project_idstringrequired
quiet_endinteger
quiet_startinteger
Quiet hours [quiet_start, quiet_end) in quiet_tz: events are recorded, nothing is sent.
quiet_tzstringrequired
recent_breachesboolean[]required
Outcomes of the last of_checks checks, oldest first.
required_breachesintegerrequired
Threshold: fire only when this many of the last of_checks checks breached (N of M).
scanner_idstringrequired
score_maxnumber
score_minnumber
snoozed_untilstring
statestringrequired
ok | firing | errored | broken (broken: switched off after repeated delivery failures)
tagstring
updated_atstringrequired
valuenumberrequired
verdictstring
window_hoursintegerrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/vision/alertsScope replay:write

Parameters

project_idstringpathrequired

Request body

application/json

A Vision alert. match fires on each matching observation; threshold checks hourly whether the count (metric = count) or average score (avg_score) of matching observations over window_hours is gte/lte value, notifying on firing and on resolve.

auto_disable_afterinteger
Consecutive failed deliveries before the alert turns broken and off (0 = never, default 5).
channelsarray
Insight-alert channels (email, slack, webhook). Omitted on update keeps the stored ones.
cooldown_minutesinteger
Match alerts: minutes between notifications (0 to 10080).
enabledboolean
kindstringrequired
match | threshold
metricstring
namestringrequired
of_checksinteger
opstring
quiet_endinteger
quiet_startinteger
Quiet hours (0 to 23, start inclusive, end exclusive, may wrap midnight) in quiet_tz.
quiet_tzstring
required_breachesinteger
Threshold: fire when this many of the last of_checks hourly checks breached (default 1 of 1).
scanner_idstringrequired
score_maxnumber
score_minnumber
snoozed_untilstring
tagstring
valuenumber
verdictstring
window_hoursinteger
24, 72, 168, 336 or 720.
{
  "auto_disable_after": 0,
  "channels": [
    {}
  ],
  "cooldown_minutes": 0,
  "enabled": true,
  "kind": "string",
  "metric": "string",
  "name": "string",
  "of_checks": 0,
  "op": "string",
  "quiet_end": 0,
  "quiet_start": 0,
  "quiet_tz": "string",
  "required_breaches": 0,
  "scanner_id": "string",
  "score_max": 0,
  "score_min": 0,
  "snoozed_until": "2024-01-01T00:00:00Z",
  "tag": "string",
  "value": 0,
  "verdict": "string",
  "window_hours": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/vision/alerts" \
  -H "Content-Type: application/json" \
  -d '{"auto_disable_after":0,"channels":[{}],"cooldown_minutes":0,"enabled":true,"kind":"string","metric":"string","name":"string","of_checks":0,"op":"string","quiet_end":0,"quiet_start":0,"quiet_tz":"string","required_breaches":0,"scanner_id":"string","score_max":0,"score_min":0,"snoozed_until":"2024-01-01T00:00:00Z","tag":"string","value":0,"verdict":"string","window_hours":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "auto_disable_after": 0,
  "broken_reason": "string",
  "channels": [
    {}
  ],
  "cooldown_minutes": 0,
  "created_at": "2024-01-01T00:00:00Z",
  "enabled": true,
  "failures": 0,
  "id": "string",
  "kind": "string",
  "last_checked_at": "2024-01-01T00:00:00Z",
  "last_fired_at": "2024-01-01T00:00:00Z",
  "last_value": 0,
  "metric": "string",
  "name": "string",
  "of_checks": 0,
  "op": "string",
  "project_id": "string",
  "quiet_end": 0,
  "quiet_start": 0,
  "quiet_tz": "string",
  "recent_breaches": [
    true
  ],
  "required_breaches": 0,
  "scanner_id": "string",
  "score_max": 0,
  "score_min": 0,
  "snoozed_until": "2024-01-01T00:00:00Z",
  "state": "string",
  "tag": "string",
  "updated_at": "2024-01-01T00:00:00Z",
  "value": 0,
  "verdict": "string",
  "window_hours": 0
}
Schema
auto_disable_afterintegerrequired
broken_reasonstring
channelsobject[]required
Notification channels as stored (Slack URLs sealed; redacted on the way out).
cooldown_minutesintegerrequired
created_atstringrequired
enabledbooleanrequired
failuresintegerrequired
Consecutive failed deliveries; at auto_disable_after (0 = never) the alert turns broken.
idstringrequired
kindstringrequired
match | threshold
last_checked_atstring
last_fired_atstring
last_valuenumber
metricstringrequired
threshold: count | avg_score
namestringrequired
of_checksintegerrequired
opstringrequired
threshold: gte | lte
project_idstringrequired
quiet_endinteger
quiet_startinteger
Quiet hours [quiet_start, quiet_end) in quiet_tz: events are recorded, nothing is sent.
quiet_tzstringrequired
recent_breachesboolean[]required
Outcomes of the last of_checks checks, oldest first.
required_breachesintegerrequired
Threshold: fire only when this many of the last of_checks checks breached (N of M).
scanner_idstringrequired
score_maxnumber
score_minnumber
snoozed_untilstring
statestringrequired
ok | firing | errored | broken (broken: switched off after repeated delivery failures)
tagstring
updated_atstringrequired
valuenumberrequired
verdictstring
window_hoursintegerrequired
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}Scope replay:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404
PUThttps://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}Scope replay:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json

A Vision alert. match fires on each matching observation; threshold checks hourly whether the count (metric = count) or average score (avg_score) of matching observations over window_hours is gte/lte value, notifying on firing and on resolve.

auto_disable_afterinteger
Consecutive failed deliveries before the alert turns broken and off (0 = never, default 5).
channelsarray
Insight-alert channels (email, slack, webhook). Omitted on update keeps the stored ones.
cooldown_minutesinteger
Match alerts: minutes between notifications (0 to 10080).
enabledboolean
kindstringrequired
match | threshold
metricstring
namestringrequired
of_checksinteger
opstring
quiet_endinteger
quiet_startinteger
Quiet hours (0 to 23, start inclusive, end exclusive, may wrap midnight) in quiet_tz.
quiet_tzstring
required_breachesinteger
Threshold: fire when this many of the last of_checks hourly checks breached (default 1 of 1).
scanner_idstringrequired
score_maxnumber
score_minnumber
snoozed_untilstring
tagstring
valuenumber
verdictstring
window_hoursinteger
24, 72, 168, 336 or 720.
{
  "auto_disable_after": 0,
  "channels": [
    {}
  ],
  "cooldown_minutes": 0,
  "enabled": true,
  "kind": "string",
  "metric": "string",
  "name": "string",
  "of_checks": 0,
  "op": "string",
  "quiet_end": 0,
  "quiet_start": 0,
  "quiet_tz": "string",
  "required_breaches": 0,
  "scanner_id": "string",
  "score_max": 0,
  "score_min": 0,
  "snoozed_until": "2024-01-01T00:00:00Z",
  "tag": "string",
  "value": 0,
  "verdict": "string",
  "window_hours": 0
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}" \
  -H "Content-Type: application/json" \
  -d '{"auto_disable_after":0,"channels":[{}],"cooldown_minutes":0,"enabled":true,"kind":"string","metric":"string","name":"string","of_checks":0,"op":"string","quiet_end":0,"quiet_start":0,"quiet_tz":"string","required_breaches":0,"scanner_id":"string","score_max":0,"score_min":0,"snoozed_until":"2024-01-01T00:00:00Z","tag":"string","value":0,"verdict":"string","window_hours":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Saving an errored or broken alert resets it

Same as 201 · POST /v1/projects/{project_id}/vision/alerts

400
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}Scope replay:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
GEThttps://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}/historyScope replay:read

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}/history"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Last 100 matches, firings, resolves and suppressed matches
Example
{
  "data": [
    {
      "at": "2024-01-01T00:00:00Z",
      "detail": "string",
      "id": 0,
      "kind": "string",
      "observation_id": "string",
      "value": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
atstringrequired
detailstring
idintegerrequired
kindstringrequired
matched | fired | resolved | errored | suppressed | quiet | broken | reset
observation_idstring
valuenumber
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}/resetScope replay:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/vision/alerts/{id}/reset"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Back to ok and enabled; failure streak and N-of-M window cleared

Same as 201 · POST /v1/projects/{project_id}/vision/alerts

404

Updated