Skip to main content
POST
Validate an unsaved 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

The outcome of validating a monitor that passed every check.

valid
boolean
required
read-only

Always true. A monitor that fails a check is rejected with the reason instead.