Skip to main content
POST
Create a monitor alert rule
You are reading the docs of Galtea 5.17. Read this page in the latest version.

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Path Parameters

monitorId
string
required

Monitor ID

Example:

"monitor_123"

Body

application/json
type
enum<string>
required

The condition that opens the alert

Available options:
BAD_SESSION_COUNT,
NO_SCORE_RATE,
AVERAGE_SCORE
Example:

"BAD_SESSION_COUNT"

window
enum<string>
required

The trailing window the rule evaluates

Available options:
FIFTEEN_MINUTES,
ONE_HOUR,
SIX_HOURS,
TWENTY_FOUR_HOURS
Example:

"ONE_HOUR"

threshold
number
required

The value the rule fires on, by type: a whole count of bad sessions for BAD_SESSION_COUNT, a percent above 0 and at most 100 for NO_SCORE_RATE

Example:

3

metricGroupId
string

A metric family this monitor scores. Mutually exclusive with specificationId.

Minimum string length: 1
Example:

"metricGroup_123"

specificationId
string

A Specification this monitor binds. The rule counts the sessions that fail any metric the Specification brings into the monitor. Mutually exclusive with metricGroupId.

Minimum string length: 1
Example:

"specification_123"

badSessionScore
number | null

BAD_SESSION_COUNT only: a session counts as bad at or below this score. Must be null or left out for NO_SCORE_RATE.

Example:

0.5

recipients
string[]

Email addresses notified when the rule fires (0 to 20). A rule needs at least one address or a webhookUrl.

Maximum array length: 20
Example:
webhookUrl
string | null

URL that receives a signed POST when an alert opens or recovers. It must use https, unless the deployment allows http. A Slack incoming-webhook URL posts a message to its channel. Write-only: responses show only its host and port. On update, null removes it and leaving it out keeps it. Read the signing secret with regenerate-alert-rule-webhook-secret.

Required string length: 1 - 2048
Example:

"https://hooks.slack.com/services/T000/B000/XXXX"

Response

Alert rule created successfully. The body holds only its id; read the rule from the Location path.

id
string
required

The new alert rule

Example:

"monitorAlertRule_123"