Create a monitor

Beta — the versioned request may change; breaking changes are
coordinated with affected customers. The default request is stable.

Creates a monitor, and any inline actions it notifies through, in the
account's default workspace.

The Observe-Api-Version header picks one of two request shapes.

Default (no header). The long-standing body, the default shape of
GET /v1/monitors/{id} with its definition and actionRules, which
does not change. The 201 returns that shape too. The schema on this
page describes the versioned shape, not this one.

Versioned. Observe-Api-Version: 2026-10-06 or later takes the
Monitor-CreateRequest below, which is written the way the versioned
GET /v1/monitors/{id} reads, and returns the created
Monitor-Resource. It is rolling out account by account; until it
reaches yours, the header returns 403. An earlier or unparseable date
takes the default shape.

A monitor read by the versioned GET can be sent as the body, edited
or not: its read-only fields are ignored. Its sharedActions bind the
same shared actions, and its inlineActions carry their definitions,
so each is created anew under the same name. One keyed by its id, which
has no name, has to be sent under a new name. A webhook header stored
with redact: true reads back masked, and a copy cannot save the mask,
so send its real value. A maxAlertsPerHour GET
reports for a monitor that follows the Observe-imposed maximum is that
maximum as a number, so the copy keeps it fixed; send null for the
server default instead.

Composite monitors are created with POST /v1/composite-monitors.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

A monitor to create, written the way Monitor-Resource reads. Fields
Monitor-Resource reads that the server derives (id,
monitorVersion, the audit fields, health and the other run state)
are accepted and ignored, so a GET body can
be sent, although additionalProperties: false below does not list
them. Any other field not listed here, at any depth, is a 400, as
is a body nested more than 32 levels deep. A body larger than 4 MiB is
a 413. null on an optional field is the same as leaving it out.

ruleKind decides which fields apply. One that does not apply is
rejected rather than ignored:

ruleKindRequiresRejects
CountvalueColumn, aggregation, baseline
ThresholdvalueColumn, aggregationbaseline
AnomalyvalueColumn, baselineaggregation, a non-empty scheduling
PromotelookbackSeconds of 0, unless on a cronvalueColumn, aggregation, baseline

Composite is not accepted here: create one with
POST /v1/composite-monitors.

string
required
length ≥ 1

Name of the monitor, unique within its workspace. A name already in use is a 409.

string | null

Monitor description. Omit for none.

boolean

Create the monitor turned off. Defaults to false.

string
enum
required

The evaluation rule kind of the monitor. Composite is the one kind that inspects no query: it alerts on a boolean condition over whether other monitors are currently alerting, correlated per group.

Allowed:
MonitorAiTriagingMode | null

Whether AI auto-investigation runs when this monitor alerts. Defaults to None.

int64 | null
≥ 1

How many AI SRE investigations this monitor may start per aiSreInvestigationWindowSeconds. Set both or neither; omit both for the account default. The rate cannot exceed the account's maximum.

int64 | null
3600 to 86400

The rolling window aiSreMaxInvestigationsPerMonitor counts over, in seconds: a whole number of hours from 1 to 24. Set both or neither.

aiSreTriggerLevels
array of objects | null

Alert severities that start an AI SRE investigation, each at most once and never None, which is not a severity an alert has. Omit or send null for every severity. An empty list is a 400: to turn investigations off, set aiTriagingMode to None.

aiSreTriggerLevels
Allowed:
objectTags
object

Tags to apply to the monitor, as a map of tag key to a list of values. Omit for none. A malformed map, or one missing a tag the workspace requires on monitors, is a 400.

double
required
≥ 0

Window of data each evaluation considers, in seconds. Above 0, except for a Promote monitor without a cron schedule, which promotes rows as they arrive and takes 0.

double | null
≥ 0

How long evaluation waits for late data before judging a window, in seconds. Omit for the server default.

int64 | null
≥ 1

Alerts per hour after which the monitor disables itself. Omit for the server default.

scheduling
object

A schedule for the monitor to run on: at most one of transform and cron. Omit scheduling, or send it empty, to let the server choose, which Monitor-Scheduling reports as automatic. An interval is always chosen by the server, so it cannot be requested. Anomaly monitors cannot set a schedule. A GET body's interval is a 400 here unless it comes with automatic: true, which leaves it to the server.

inputQuery
object
required

The OPAL query the rules are evaluated over, as a pipeline of stages.

string | null

Column of the query output the monitor watches. Required for Threshold and Anomaly.

MonitorValueAggregation | null

How valueColumn is reduced over each window before the rules compare it. Required for Threshold.

MonitorBaselineInput | null
rules
array of objects
required
length ≥ 1

When the monitor alerts, one rule per severity, plus at most one NoData rule for a Threshold or Anomaly monitor. See Monitor-RuleInput for which fields each kind uses.

rules*
groupBy
array of objects

Dimensions the rules are evaluated per; each distinct combination of values alerts independently. Omit for a single global alert.

groupBy
serviceBindings
array of objects
length ≤ 1

The service the monitor's alerts are attributed to. Omit for none.

serviceBindings
sharedActions
object

Shared actions to notify through, by action id, and when each fires. Omit for none.

inlineActions
object

Actions that belong to this monitor alone, by a name you choose: up to 64 letters, digits, - and _, starting with a letter. The name is how the monitor's GET reports the action and how a PATCH changes it. Omit for none.

customVariables
object | null

Free-form values for substitution into action templates. Omit for none.

Headers
string
^\d{4}-\d{2}-\d{2}$

Picks the request and response shape by release date (YYYY-MM-DD). 2026-10-06 or later takes Monitor-CreateRequest and returns Monitor-Resource, if enabled for your account (otherwise 403). No header, or an earlier or unparseable date, takes the default shape described above.

Responses

Language
Credentials
Bearer
Authorization: Bearer <customerid> <apitoken>
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json