Query parameters
Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.
Headers
Bearer $TOKEN
application/json
Body parameters
Alert name. Until you rename the alert, its name follows the chart's name.
Alert type. An update can change it.
Valid values:threshold: Fires when the value crosses a threshold.relative: Compares the value with the previous period as a percentage change.anomaly_rrcf: Uses machine learning anomaly detection. Table charts don't accept it.
Dashboard of the chart this alert watches. null for an alert on an exploration. Set it with chart_id for an alert on a dashboard chart, or set exploration_id instead. Can't be changed after the alert is created.
Chart this alert watches, on the dashboard in dashboard_id. null for an alert on an exploration. Can't be changed after the alert is created.
Exploration this alert watches. null for an alert on a dashboard chart. Set it instead of dashboard_id and chart_id for an alert on an exploration. Can't be changed after the alert is created.
How the value is compared. Required for threshold and relative alerts. anomaly_rrcf alerts don't use it, and it's left out of their responses.
Valid values:equal: A threshold alert fires when the value equals value or string_value.not_equal: A threshold alert fires when the value differs from value or string_value.higher_than: A threshold alert fires when the value is above value.higher_than_or_equal: A threshold alert fires when the value is at or above value.lower_than: A threshold alert fires when the value is below value.lower_than_or_equal: A threshold alert fires when the value is at or below value.increases_by: A relative alert fires when the value rises by value percent or more.decreases_by: A relative alert fires when the value falls by value percent or more.changes_by: A relative alert fires when the value rises or falls by value percent or more.
The threshold for threshold alerts, or the percentage change for relative alerts. 0 is a valid value. null when the alert compares string_value. Creating a threshold or relative alert needs value or string_value. Left out for anomaly_rrcf alerts.
The exact text a threshold alert compares, instead of value, with equal or not_equal only. When it's set, value isn't needed and is null. Returned for threshold alerts only.
Whether the alert is paused. Send it as a JSON boolean, because the string "true" is ignored.
The time window of data each check looks at, in seconds. Defaults to aggregation_interval, then check_period, then 60.
How long the condition must hold before an incident starts, in seconds, from 0 to 86400. 0 starts it at once.
Seconds the value must stay recovered before the incident resolves on its own, or null to never resolve it automatically.
The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to query_period, then check_period, then 60.
How often the alert is checked, in seconds. Not returned for anomaly_rrcf alerts. An update that sends check_period without query_period or aggregation_interval sets both of them to the same value. Required when creating a threshold or relative alert.
The series the alert is limited to. An empty list means every series. Can't be combined with series_names_except. Setting either one replaces both.
The series the alert ignores while it watches every other series. Can't be combined with series_names, so it's empty when series_names is used. Setting either one replaces both.
The sources the alert runs on, as source: followed by comma-separated source table names, or null when none is set. With the source_variable and platforms_single_source modes, the value must start with source:.
How the alert picks its sources.
Valid values:source_variable: Runs on the sources in source_variable.platforms_single_source: Runs on the one source in source_variable, limited to source_platforms.platforms_all_sources: Runs on every source that matches source_platforms.
Platforms that limit the sources and services the alert runs on, for the platforms_single_source and platforms_all_sources source modes.
Where the incident is routed. Can be the string current_team, which is the default, an object with policy_id and policy_name, or an object with team_id and team_name. The string unknown means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by team_id. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.
A custom description for the incidents the alert starts, in Markdown, or null when none is set. Accepts the same template variables as incident_name, such as {{current_value}} and {{threshold_value}}.
A custom name for the incidents the alert starts, in plain text, or null when none is set. Accepts template variables such as {{alert_name}}, {{series_name}}, {{current_value}}, {{threshold_value}}, {{team_name}}, the chart's variables and the columns its query returns.
Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.
Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.
The type of the condition, threshold or relative.
The comparison the condition makes, from the same values as operator.
Threshold value. null when the condition compares string_value.
Threshold value for a string series. null when the condition compares value.
The series the condition is limited to. An empty list means every series.
The series the condition ignores while it watches every other series.
Values this alert sets for the template variables of its dashboard or exploration. Each name must be a variable defined there. Source variables aren't accepted, so use source_mode and source_variable instead.
The name of a variable on the alert's dashboard or exploration.
For a select_predefined_sql variable, the label of the filter the alert uses.
The values the alert uses for the variable, as strings.
What a check does when the query returns no data. Can't be sent for anomaly_rrcf alerts, and is left out of their responses. Defaults to dont_fire on threshold and relative alerts. Anomaly alerts don't accept it.
Valid values:treat_as_zero: Checks the missing data as if the value were 0.dont_fire: Starts no incident for missing data.treat_as_previous: Checks the missing data as if it had the previous value.start_incident: Starts an incident when the query returns no data.
How far a value must deviate from its prediction to trigger the alert, for anomaly_rrcf alerts only. Shown as Significance in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts. Defaults to 5.0 on anomaly_rrcf alerts. Threshold and relative alerts don't accept it.
Which direction of anomaly fires the alert, for anomaly_rrcf alerts only. Left out of the response on threshold and relative alerts. Defaults to any on anomaly_rrcf alerts. Threshold and relative alerts don't accept it.
Valid values:any: Fires on values above or below the prediction.higher: Fires on values above the prediction.lower: Fires on values below the prediction.
Interval in seconds the anomaly chart shows, for anomaly_rrcf alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.
Days of history the anomaly model is first trained on, from 1 to 30. For anomaly_rrcf alerts only. Left out of the response on threshold and relative alerts. Defaults to 7 on anomaly_rrcf alerts. Threshold and relative alerts don't accept it.
Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending true is refused on a plan without phone call alerts, unless the alert already has them on. Defaults to false on create. An alert that routes to an escalation policy doesn't use it.
Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending true is refused on a plan without SMS alerts, unless the alert already has them on. Defaults to false on create. An alert that routes to an escalation policy doesn't use it.
Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy. Defaults to false on create. An alert that routes to an escalation policy doesn't use it.
Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending true is refused on a plan without push notifications, unless the alert already has them on. Defaults to false on create. An alert that routes to an escalation policy doesn't use it.
Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending true is refused on a plan without critical alerts, unless the alert already has them on. Defaults to false on create. An alert that routes to an escalation policy doesn't use it.
Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as null.