Create Topline Alert

posthttps://statsigapi.net/console/v1/alerts

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Body

application/json
namestringrequired

Name of the alert (4-100 characters)

messagestring

Alert message shown when the alert fires

teamIDstring

ID of the team that owns this alert

formulastring

Formula 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[]stringrequired

Property column to group by

key[]stringrequired

Property key to group by

tagsobject[]

Tags to attach to the alert on creation

Show child attributes
id[]stringrequired

ID of the tag

name[]stringrequired

Name of the tag

Response

application/json
201· Create Alert success response
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired

ID of the alert

namestringrequired

Name of the alert

alertTypestringrequired

Type of alert

metricsobjectrequired

List of metrics associated with this alert

metricGroupBysobjectrequired

Metric groupbys

formulastring

Formula for the alert

messagestringrequired

Alert message

creatorIDstring
companyIDstringrequired
prioritystringrequired

Priority of this alert

alertThresholdnumberrequired
warningThresholdnumber
windowMsnumberrequired

How far back and how frequently a metric should be checked, in milliseconds

conditionstringrequired

Condition under which a metric change triggers an alert in milliseconds

renotificationConditionsstring[]

Condition under which a re-notification is sent

renotificationWindowMsnumber

How long to wait before re-notifying in milliseconds

renotificationMessagestring

Re-notification message

teamstring

Team associated with this alert

tagsstring[]required

Tags associated with this alert

statusstringrequired

Current evaluation status of the alert

lastTriggeredTimenumberrequired

Timestamp in milliseconds of the last time this alert triggered

403· Forbidden resource
statusnumberrequired
messagestringrequired

Was this helpful?