Create Topline Alert
https://statsigapi.net/console/v1/alertsAuthorizations
STATSIG-API-KEYstringrequiredapiKey (header)
Body
application/jsonnamestringrequiredName of the alert (4-100 characters)
messagestringAlert message shown when the alert fires
teamIDstringID of the team that owns this alert
formulastringFormula expression combining the alert metrics
definitionMetricsJsonstring[]JSON-encoded metric definitions evaluated by the alert. Each entry is a stringified ToplineAlertMExDefinitionOrUnresolved.
groupBysobject[]Properties to group the alert metrics by
Show child attributes
column[]stringrequiredProperty column to group by
key[]stringrequiredProperty key to group by
tagsobject[]Tags to attach to the alert on creation
Show child attributes
id[]stringrequiredID of the tag
name[]stringrequiredName of the tag
Response
application/jsonmessagestringrequiredA simple string explaining the result of the operation.
dataobjectrequiredShow child attributes
idstringrequiredID of the alert
namestringrequiredName of the alert
alertTypestringrequiredType of alert
metricsobjectrequiredList of metrics associated with this alert
metricGroupBysobjectrequiredMetric groupbys
formulastringFormula for the alert
messagestringrequiredAlert message
creatorIDstringcompanyIDstringrequiredprioritystringrequiredPriority of this alert
alertThresholdnumberrequiredwarningThresholdnumberwindowMsnumberrequiredHow far back and how frequently a metric should be checked, in milliseconds
conditionstringrequiredCondition under which a metric change triggers an alert in milliseconds
renotificationConditionsstring[]Condition under which a re-notification is sent
renotificationWindowMsnumberHow long to wait before re-notifying in milliseconds
renotificationMessagestringRe-notification message
teamstringTeam associated with this alert
tagsstring[]requiredTags associated with this alert
statusstringrequiredCurrent evaluation status of the alert
lastTriggeredTimenumberrequiredTimestamp in milliseconds of the last time this alert triggered
statusnumberrequiredmessagestringrequiredWas this helpful?