Skip to main content
POST
Create a monitor

Authorizations

Authorization
string
header
required

Organization API key (sl_…).

Headers

x-tenant-id
string
required

The organization ID the request is scoped to.

Body

application/json

A monitor to create, or the full replacement for an existing one.

The body carries every setting a read returns, except the ones the server maintains. Filters naming a usage group or usage group set by name are stored by reference, so a read returns them as templates resolved through message_config.templated_values; sending that form back is equivalent. A paragraph with no body_template, and a chart or table with no title, gets generated ones, which a read returns.

name
string
required

The monitor's name, as it appears in the feed.

Minimum string length: 1
data_source
enum<string>
required

The data the monitor reads. custom runs the monitor's own SQL, and requires a custom_sql_results section naming a saved statement by custom_sql_id, and a snowflake_account_id to run it against.

Available options:
account_spend,
organization_spend,
warehouse,
account_usage_group,
organization_usage_group,
workload,
custom,
insights,
storage,
select_org_spend,
databricks_workload,
databricks_query,
bigquery_workload,
bigquery_query,
bigquery_projects,
bigquery_reservation,
bigquery_storage,
budget
state
enum<string>
required

Whether the monitor runs. A disabled or snoozed monitor is not scheduled.

Available options:
enabled,
disabled,
snoozed
schedule
enum<string>
required

How often the monitor runs. cron reads cron for the schedule.

Available options:
hourly,
daily,
weekly,
monthly,
cron
trigger_config
DigestTrigger · object
required

What the monitor checks, and the condition that makes it fire.

message_config
MonitorMessageConfig · object
required

What the monitor's notification says when it fires.

notification_frequency_config
MonitorNotificationFrequencyOnTrigger · object
required

How often a firing monitor is allowed to notify.

destination_ids
string[]
required

The alert destinations the monitor notifies when it fires. An empty list notifies no one: the monitor still runs, and its runs still appear in the feed while display_in_feed is true.

cron
string | null

The cron expression the monitor runs on, in UTC. Required when schedule is cron, which only a monitor whose data_source is custom may use; null otherwise.

display_in_feed
boolean
default:true

Whether the monitor's runs appear in the monitors feed.

team_id
string | null

The team that owns this monitor. Null leaves it to the organization, or to snowflake_account_id when that is set. Requires permission to write monitors for that team.

budget_id
string | null

The budget this monitor watches. Null on a monitor that watches something other than a budget.

snowflake_account_id
string | null

The Snowflake account this monitor reads, as listed by /v2/snowflake-accounts. Null reads the organization as a whole.

partition_config
PartitionConfig · object | null

Splits the monitor into an independent check per distinct value of these columns. Null checks the data as a whole.

Response

Successful Response

A scheduled check over the organization's data, and what it reports.

A monitor runs its trigger_config on schedule; when the trigger fires it renders message_config and sends it, as often as notification_frequency_config allows. partition_config splits one monitor into an independent check per partition, each of which triggers and is dismissed on its own.

id
string
required
read-only

The unique identifier of the monitor.

name
string
required

The monitor's name, as it appears in the feed.

data_source
enum<string>
required

The data the monitor reads. custom runs the monitor's own SQL.

Available options:
account_spend,
organization_spend,
warehouse,
account_usage_group,
organization_usage_group,
workload,
custom,
insights,
storage,
select_org_spend,
databricks_workload,
databricks_query,
bigquery_workload,
bigquery_query,
bigquery_projects,
bigquery_reservation,
bigquery_storage,
budget
state
enum<string>
required

Whether the monitor runs. A disabled or snoozed monitor is not scheduled and has no next run.

Available options:
enabled,
disabled,
snoozed
schedule
enum<string>
required

How often the monitor runs. cron reads cron for the schedule.

Available options:
hourly,
daily,
weekly,
monthly,
cron
display_in_feed
boolean
required

Whether the monitor's runs appear in the monitors feed.

type
enum<string>
required
read-only

What kind of check the monitor runs. The same value as trigger_config.type, lifted out so it can be filtered and read without parsing the configuration.

Available options:
digest,
condition,
anomaly_prophet,
anomaly_percentile,
budget_threshold
trigger_config
DigestTrigger · object
required

What the monitor checks, and the condition that makes it fire.

message_config
MonitorMessageConfig · object
required

What the monitor's notification says when it fires.

notification_frequency_config
MonitorNotificationFrequencyOnTrigger · object
required

How often a firing monitor is allowed to notify.

destination_ids
string[]
required

The alert destinations the monitor notifies when it fires, in ascending order.

status
enum<string>
required
read-only

What the monitor is doing now. disabled or snoozed when its state stops it running; otherwise how its most recent run ended, or new when it has not run yet.

Available options:
new,
success,
failure,
triggered,
skipped,
snoozed,
unknown,
disabled
latest_run_status
enum<string>
required
read-only

How the most recent run in the monitor's run history ended. This ignores state, so a disabled monitor still reports the run it last completed, which status would report as disabled. A monitor with no run history reports new while enabled and unknown otherwise.

Available options:
new,
success,
failure,
triggered,
skipped,
snoozed,
unknown
create_time
string
required
read-only

RFC 3339 UTC creation timestamp.

update_time
string
required
read-only

RFC 3339 UTC last-update timestamp.

etag
string
required
read-only

Opaque strong ETag.

cron
string | null

The cron expression the monitor runs on, in UTC. Set only when schedule is cron.

team_id
string | null

The team that owns this monitor. Null means no team owns it — it belongs to the organization, or, for a monitor running its own SQL, to one connection.

budget_id
string | null

The budget this monitor watches. Null on a monitor that watches something other than a budget.

snowflake_account_id
string | null

The Snowflake account this monitor reads, as listed by /v2/snowflake-accounts. Set on a monitor running its own SQL. Null on a monitor that reads the organization as a whole.

partition_config
PartitionConfig · object | null

Splits the monitor into an independent check per distinct value of these columns. Null checks the data as a whole.

last_run_status
enum<string> | null

How the monitor's most recent finished run ended, as the monitor itself recorded it. Null on a monitor that has never finished a run.

Available options:
new,
success,
failure,
triggered,
skipped,
snoozed,
unknown
latest_run_error_message
string | null

Why the most recent run failed. Null when that run succeeded, or when the monitor has not run.

latest_notification_send_time
string | null

RFC 3339 UTC timestamp of the last run that actually sent a notification. Null if the monitor has never notified.

latest_run_trigger_status
enum<string> | null

Whether the most recent run's trigger fired. Null until the monitor has run.

Available options:
triggered,
not_triggered,
skipped,
snoozed,
unknown
last_run_finish_time
string | null

RFC 3339 UTC timestamp of when the most recent run finished. Null until the monitor has run.

next_run_time
string | null

RFC 3339 UTC timestamp of when the monitor's schedule next comes due. The run itself starts once the data for that period has finished loading, which can be later. Null while the monitor is disabled or snoozed.

dismiss_time
string | null

RFC 3339 UTC timestamp of when the monitor was dismissed from the feed. Null while it is not dismissed.

dismissed_by
string | null

Who dismissed the monitor from the feed.

dismissed_partitions
MonitorPartitionDismissal · object[] | null

The partitions dismissed from the feed individually. Null on a monitor with no partitions dismissed.

created_by
string | null

Who created the monitor.

updated_by
string | null

Who last changed the monitor. Null if no one has since it was created.