Alerts

Custom alerts require a validated context_sql_query in addition to the scalar condition sql_query.

post/dashboard/api/alerts

Request

  • Base URL
    https://api.agnost.ai
  • URL
    https://api.agnost.ai/dashboard/api/alerts
  • Auth
    • HTTP bearer and API key in header x-org-id
    • or API key in header x-api-key

Request body

idstring uuid
namestring
event_type'custom' | 'global_report'

suggested_intent alerts are triggered by intent discovery rather than the scheduled alert poller.

natural_language_querystring
sql_querystring
context_sql_querystring

Required for custom alerts. Returns up to five recent detail rows after the condition threshold is met.

action_natural_language_querystring

Optional instruction used only when no details query is available.

threshold_valuenumber
threshold_operator'>' | '<' | '>=' | '<=' | '=='
check_interval_hoursinteger
connection_idsstring[]
recipient_emailsstring[]
activeboolean
created_atstring date-time
updated_atstring date-time

Response

Alert created

Changes