Skip to main content

Alert

View as Markdown

Get GA

GET /api/2.0/alerts/{id}

Gets an alert.

API scopes: alerts

Parameters

idstringpath

Response

idstring

UUID identifying the alert.

Example: fe25e731-92f2-4838-9fb2-1ca364320a3d

display_namestring

The display name of the alert.

Example: Example alert

owner_user_namestring

The owner's username. This field is set to "Unavailable" if the user has been deleted.

Example: user@acme.com

create_timestring

The timestamp indicating when the alert was created.

update_timestring

The timestamp indicating when the alert was updated.

parent_pathstring

The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.

Example: /Users/user@acme.com

query_textstring

Text of the query to be run.

Example: SELECT 1

warehouse_idstring

ID of the SQL warehouse attached to the alert.

Example: a7066a8ef796be84

run_as_user_namestring

The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. Deprecated: Use run_as field instead. This field will be removed in a future release.

Example: user@acme.com

evaluationobject
Show child attributesHide child attributes
sourceobject

Source column from result to use to evaluate alert

Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

comparison_operatorstring

Operator used for comparison in alert evaluation.

Values: LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IS_NULL, IS_NOT_NULL

thresholdobject

Threshold to user for alert evaluation, can be a column or a value.

Show child attributesHide child attributes
columnobjectRequired
Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

valueobjectRequired
Show child attributesHide child attributes
string_valuestringRequired

Example: foo

double_valuedoubleRequired

Example: 1.25

bool_valuebooleanRequired

Example: true

notificationobject

User or Notification Destination to notify when alert is triggered.

Show child attributesHide child attributes
subscriptionsarray of object
Show child attributesHide child attributes
user_emailstringRequired
destination_idstringRequired
retrigger_secondsint32

Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to 0 or omitted, the alert will not send any further notifications after the first trigger Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.

Example: 0

notify_on_okboolean

Whether to notify alert subscribers when alert returns back to normal.

statestring

Latest state of alert evaluation.

Values: UNKNOWN, TRIGGERED, OK, ERROR

last_evaluated_atstring

Timestamp of the last evaluation.

empty_result_statestring

Alert state if result is empty. Please avoid setting this field to be UNKNOWN because UNKNOWN state is planned to be deprecated.

Values: UNKNOWN, TRIGGERED, OK, ERROR

scheduleobject
Show child attributesHide child attributes
quartz_cron_schedulestring

A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html

timezone_idstring

A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.

pause_statusstring

Indicate whether this schedule is paused or not.

Default: UNPAUSED

Values: UNPAUSED, PAUSED

lifecycle_statestring

Indicates whether the query is trashed.

Values: ACTIVE, DELETED

custom_summarystring

Custom summary for the alert. support mustache template.

custom_descriptionstring

Custom description for the alert. support mustache template.

run_asobject

Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal.

  • For user identity: Set user_name to the email of an active workspace user. Users can only set this to their own email.
  • For service principal: Set service_principal_name to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

effective_run_asobject

The actual identity that will be used to execute the alert. This is an output-only field that shows the resolved run-as identity after applying permissions and defaults.

Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

List GA

GET /api/2.0/alerts

Gets a list of alerts accessible to the user, ordered by creation time.

API scopes: alerts

Parameters

page_tokenstringquery
page_sizeint32query

Default: 20

Constraints: <= 100

Response

alertsarray of object
Show child attributesHide child attributes
idstring

UUID identifying the alert.

Example: fe25e731-92f2-4838-9fb2-1ca364320a3d

display_namestring

The display name of the alert.

Example: Example alert

owner_user_namestring

The owner's username. This field is set to "Unavailable" if the user has been deleted.

Example: user@acme.com

create_timestring

The timestamp indicating when the alert was created.

update_timestring

The timestamp indicating when the alert was updated.

parent_pathstring

The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.

Example: /Users/user@acme.com

query_textstring

Text of the query to be run.

Example: SELECT 1

warehouse_idstring

ID of the SQL warehouse attached to the alert.

Example: a7066a8ef796be84

run_as_user_namestring

The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. Deprecated: Use run_as field instead. This field will be removed in a future release.

Example: user@acme.com

evaluationobject
Show child attributesHide child attributes
sourceobject

Source column from result to use to evaluate alert

Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

comparison_operatorstring

Operator used for comparison in alert evaluation.

Values: LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IS_NULL, IS_NOT_NULL

thresholdobject

Threshold to user for alert evaluation, can be a column or a value.

Show child attributesHide child attributes
columnobjectRequired
valueobjectRequired
notificationobject

User or Notification Destination to notify when alert is triggered.

Show child attributesHide child attributes
subscriptionsarray of object
retrigger_secondsint32

Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to 0 or omitted, the alert will not send any further notifications after the first trigger Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.

Example: 0

notify_on_okboolean

Whether to notify alert subscribers when alert returns back to normal.

statestring

Latest state of alert evaluation.

Values: UNKNOWN, TRIGGERED, OK, ERROR

last_evaluated_atstring

Timestamp of the last evaluation.

empty_result_statestring

Alert state if result is empty. Please avoid setting this field to be UNKNOWN because UNKNOWN state is planned to be deprecated.

Values: UNKNOWN, TRIGGERED, OK, ERROR

scheduleobject
Show child attributesHide child attributes
quartz_cron_schedulestring

A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html

timezone_idstring

A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.

pause_statusstring

Indicate whether this schedule is paused or not.

Default: UNPAUSED

Values: UNPAUSED, PAUSED

lifecycle_statestring

Indicates whether the query is trashed.

Values: ACTIVE, DELETED

custom_summarystring

Custom summary for the alert. support mustache template.

custom_descriptionstring

Custom description for the alert. support mustache template.

run_asobject

Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal.

  • For user identity: Set user_name to the email of an active workspace user. Users can only set this to their own email.
  • For service principal: Set service_principal_name to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

effective_run_asobject

The actual identity that will be used to execute the alert. This is an output-only field that shows the resolved run-as identity after applying permissions and defaults.

Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

next_page_tokenstring

Create GA

POST /api/2.0/alerts

Create Alert

API scopes: alerts

Request body

alertobject
Show child attributesHide child attributes
idstring

UUID identifying the alert.

Example: fe25e731-92f2-4838-9fb2-1ca364320a3d

display_namestring

The display name of the alert.

Example: Example alert

owner_user_namestring

The owner's username. This field is set to "Unavailable" if the user has been deleted.

Example: user@acme.com

create_timestring

The timestamp indicating when the alert was created.

update_timestring

The timestamp indicating when the alert was updated.

parent_pathstring

The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.

Example: /Users/user@acme.com

query_textstring

Text of the query to be run.

Example: SELECT 1

warehouse_idstring

ID of the SQL warehouse attached to the alert.

Example: a7066a8ef796be84

run_as_user_namestring

The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. Deprecated: Use run_as field instead. This field will be removed in a future release.

Example: user@acme.com

evaluationobject
Show child attributesHide child attributes
sourceobject

Source column from result to use to evaluate alert

Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

comparison_operatorstring

Operator used for comparison in alert evaluation.

Values: LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IS_NULL, IS_NOT_NULL

thresholdobject

Threshold to user for alert evaluation, can be a column or a value.

Show child attributesHide child attributes
columnobjectRequired
valueobjectRequired
notificationobject

User or Notification Destination to notify when alert is triggered.

Show child attributesHide child attributes
subscriptionsarray of object
retrigger_secondsint32

Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to 0 or omitted, the alert will not send any further notifications after the first trigger Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.

Example: 0

notify_on_okboolean

Whether to notify alert subscribers when alert returns back to normal.

statestring

Latest state of alert evaluation.

Values: UNKNOWN, TRIGGERED, OK, ERROR

last_evaluated_atstring

Timestamp of the last evaluation.

empty_result_statestring

Alert state if result is empty. Please avoid setting this field to be UNKNOWN because UNKNOWN state is planned to be deprecated.

Values: UNKNOWN, TRIGGERED, OK, ERROR

scheduleobject
Show child attributesHide child attributes
quartz_cron_schedulestring

A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html

timezone_idstring

A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.

pause_statusstring

Indicate whether this schedule is paused or not.

Default: UNPAUSED

Values: UNPAUSED, PAUSED

lifecycle_statestring

Indicates whether the query is trashed.

Values: ACTIVE, DELETED

custom_summarystring

Custom summary for the alert. support mustache template.

custom_descriptionstring

Custom description for the alert. support mustache template.

run_asobject

Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal.

  • For user identity: Set user_name to the email of an active workspace user. Users can only set this to their own email.
  • For service principal: Set service_principal_name to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

effective_run_asobject

The actual identity that will be used to execute the alert. This is an output-only field that shows the resolved run-as identity after applying permissions and defaults.

Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

Response

idstring

UUID identifying the alert.

Example: fe25e731-92f2-4838-9fb2-1ca364320a3d

display_namestring

The display name of the alert.

Example: Example alert

owner_user_namestring

The owner's username. This field is set to "Unavailable" if the user has been deleted.

Example: user@acme.com

create_timestring

The timestamp indicating when the alert was created.

update_timestring

The timestamp indicating when the alert was updated.

parent_pathstring

The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.

Example: /Users/user@acme.com

query_textstring

Text of the query to be run.

Example: SELECT 1

warehouse_idstring

ID of the SQL warehouse attached to the alert.

Example: a7066a8ef796be84

run_as_user_namestring

The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. Deprecated: Use run_as field instead. This field will be removed in a future release.

Example: user@acme.com

evaluationobject
Show child attributesHide child attributes
sourceobject

Source column from result to use to evaluate alert

Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

comparison_operatorstring

Operator used for comparison in alert evaluation.

Values: LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IS_NULL, IS_NOT_NULL

thresholdobject

Threshold to user for alert evaluation, can be a column or a value.

Show child attributesHide child attributes
columnobjectRequired
Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

valueobjectRequired
Show child attributesHide child attributes
string_valuestringRequired

Example: foo

double_valuedoubleRequired

Example: 1.25

bool_valuebooleanRequired

Example: true

notificationobject

User or Notification Destination to notify when alert is triggered.

Show child attributesHide child attributes
subscriptionsarray of object
Show child attributesHide child attributes
user_emailstringRequired
destination_idstringRequired
retrigger_secondsint32

Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to 0 or omitted, the alert will not send any further notifications after the first trigger Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.

Example: 0

notify_on_okboolean

Whether to notify alert subscribers when alert returns back to normal.

statestring

Latest state of alert evaluation.

Values: UNKNOWN, TRIGGERED, OK, ERROR

last_evaluated_atstring

Timestamp of the last evaluation.

empty_result_statestring

Alert state if result is empty. Please avoid setting this field to be UNKNOWN because UNKNOWN state is planned to be deprecated.

Values: UNKNOWN, TRIGGERED, OK, ERROR

scheduleobject
Show child attributesHide child attributes
quartz_cron_schedulestring

A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html

timezone_idstring

A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.

pause_statusstring

Indicate whether this schedule is paused or not.

Default: UNPAUSED

Values: UNPAUSED, PAUSED

lifecycle_statestring

Indicates whether the query is trashed.

Values: ACTIVE, DELETED

custom_summarystring

Custom summary for the alert. support mustache template.

custom_descriptionstring

Custom description for the alert. support mustache template.

run_asobject

Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal.

  • For user identity: Set user_name to the email of an active workspace user. Users can only set this to their own email.
  • For service principal: Set service_principal_name to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

effective_run_asobject

The actual identity that will be used to execute the alert. This is an output-only field that shows the resolved run-as identity after applying permissions and defaults.

Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

Update GA

PATCH /api/2.0/alerts/{alert.id}

Update alert

API scopes: alerts

Parameters

alertobjectpath
Show child attributesHide child attributes
idstring

UUID identifying the alert.

Example: fe25e731-92f2-4838-9fb2-1ca364320a3d

display_namestring

The display name of the alert.

Example: Example alert

owner_user_namestring

The owner's username. This field is set to "Unavailable" if the user has been deleted.

Example: user@acme.com

create_timestring

The timestamp indicating when the alert was created.

update_timestring

The timestamp indicating when the alert was updated.

parent_pathstring

The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.

Example: /Users/user@acme.com

query_textstring

Text of the query to be run.

Example: SELECT 1

warehouse_idstring

ID of the SQL warehouse attached to the alert.

Example: a7066a8ef796be84

run_as_user_namestring

The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. Deprecated: Use run_as field instead. This field will be removed in a future release.

Example: user@acme.com

evaluationobject
Show child attributesHide child attributes
sourceobject

Source column from result to use to evaluate alert

Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

comparison_operatorstring

Operator used for comparison in alert evaluation.

Values: LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IS_NULL, IS_NOT_NULL

thresholdobject

Threshold to user for alert evaluation, can be a column or a value.

Show child attributesHide child attributes
columnobjectRequired
valueobjectRequired
notificationobject

User or Notification Destination to notify when alert is triggered.

Show child attributesHide child attributes
subscriptionsarray of object
retrigger_secondsint32

Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to 0 or omitted, the alert will not send any further notifications after the first trigger Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.

Example: 0

notify_on_okboolean

Whether to notify alert subscribers when alert returns back to normal.

statestring

Latest state of alert evaluation.

Values: UNKNOWN, TRIGGERED, OK, ERROR

last_evaluated_atstring

Timestamp of the last evaluation.

empty_result_statestring

Alert state if result is empty. Please avoid setting this field to be UNKNOWN because UNKNOWN state is planned to be deprecated.

Values: UNKNOWN, TRIGGERED, OK, ERROR

scheduleobject
Show child attributesHide child attributes
quartz_cron_schedulestring

A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html

timezone_idstring

A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.

pause_statusstring

Indicate whether this schedule is paused or not.

Default: UNPAUSED

Values: UNPAUSED, PAUSED

lifecycle_statestring

Indicates whether the query is trashed.

Values: ACTIVE, DELETED

custom_summarystring

Custom summary for the alert. support mustache template.

custom_descriptionstring

Custom description for the alert. support mustache template.

run_asobject

Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal.

  • For user identity: Set user_name to the email of an active workspace user. Users can only set this to their own email.
  • For service principal: Set service_principal_name to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

effective_run_asobject

The actual identity that will be used to execute the alert. This is an output-only field that shows the resolved run-as identity after applying permissions and defaults.

Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

update_maskstringquery

Response

idstring

UUID identifying the alert.

Example: fe25e731-92f2-4838-9fb2-1ca364320a3d

display_namestring

The display name of the alert.

Example: Example alert

owner_user_namestring

The owner's username. This field is set to "Unavailable" if the user has been deleted.

Example: user@acme.com

create_timestring

The timestamp indicating when the alert was created.

update_timestring

The timestamp indicating when the alert was updated.

parent_pathstring

The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.

Example: /Users/user@acme.com

query_textstring

Text of the query to be run.

Example: SELECT 1

warehouse_idstring

ID of the SQL warehouse attached to the alert.

Example: a7066a8ef796be84

run_as_user_namestring

The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. Deprecated: Use run_as field instead. This field will be removed in a future release.

Example: user@acme.com

evaluationobject
Show child attributesHide child attributes
sourceobject

Source column from result to use to evaluate alert

Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

comparison_operatorstring

Operator used for comparison in alert evaluation.

Values: LESS_THAN, GREATER_THAN, EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IS_NULL, IS_NOT_NULL

thresholdobject

Threshold to user for alert evaluation, can be a column or a value.

Show child attributesHide child attributes
columnobjectRequired
Show child attributesHide child attributes
namestring
displaystring
aggregationstring

If not set, the behavior is equivalent to using First row in the UI.

Values: SUM, COUNT, COUNT_DISTINCT, AVG, MEDIAN, MIN, MAX, STDDEV

valueobjectRequired
Show child attributesHide child attributes
string_valuestringRequired

Example: foo

double_valuedoubleRequired

Example: 1.25

bool_valuebooleanRequired

Example: true

notificationobject

User or Notification Destination to notify when alert is triggered.

Show child attributesHide child attributes
subscriptionsarray of object
Show child attributesHide child attributes
user_emailstringRequired
destination_idstringRequired
retrigger_secondsint32

Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to 0 or omitted, the alert will not send any further notifications after the first trigger Setting this value to 1 allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes.

Example: 0

notify_on_okboolean

Whether to notify alert subscribers when alert returns back to normal.

statestring

Latest state of alert evaluation.

Values: UNKNOWN, TRIGGERED, OK, ERROR

last_evaluated_atstring

Timestamp of the last evaluation.

empty_result_statestring

Alert state if result is empty. Please avoid setting this field to be UNKNOWN because UNKNOWN state is planned to be deprecated.

Values: UNKNOWN, TRIGGERED, OK, ERROR

scheduleobject
Show child attributesHide child attributes
quartz_cron_schedulestring

A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html

timezone_idstring

A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the quartz_cron_schedule to determine the schedule. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details.

pause_statusstring

Indicate whether this schedule is paused or not.

Default: UNPAUSED

Values: UNPAUSED, PAUSED

lifecycle_statestring

Indicates whether the query is trashed.

Values: ACTIVE, DELETED

custom_summarystring

Custom summary for the alert. support mustache template.

custom_descriptionstring

Custom description for the alert. support mustache template.

run_asobject

Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal.

  • For user identity: Set user_name to the email of an active workspace user. Users can only set this to their own email.
  • For service principal: Set service_principal_name to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

effective_run_asobject

The actual identity that will be used to execute the alert. This is an output-only field that shows the resolved run-as identity after applying permissions and defaults.

Show child attributesHide child attributes
user_namestringRequired

The email of an active workspace user. Can only set this field to their own email.

Example: user@databricks.com

service_principal_namestringRequired

Application ID of an active service principal. Setting this field requires the servicePrincipal/user role.

Example: 692bc6d0-ffa3-11ed-be56-0242ac120002

Delete GA

DELETE /api/2.0/alerts/{id}

Moves an alert to the trash. Trashed alerts immediately disappear from list views, and can no longer trigger. You can restore a trashed alert through the UI. A trashed alert is permanently deleted after 30 days.

API scopes: alerts

Parameters

idstringpath