Alert
Alert object
- idstringOutput onlyIDImmutable
The canonical identifier of the alert to retrieve information about.
- display_namestring
The display name of the alert.
- owner_user_namestringOutput only
The owner's username. This field is set to "Unavailable" if the user has been deleted.
- create_timestringOutput only
The timestamp indicating when the alert was created.
- update_timestringOutput only
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.
- query_textstring
Text of the query to be run.
- warehouse_idstring
ID of the SQL warehouse attached to the alert.
- run_as_user_namestringDeprecated
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_asfield instead. This field will be removed in a future release.
- 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 rowin the UI.SUMCOUNTCOUNT_DISTINCTAVGMEDIANMINMAXSTDDEV
- comparison_operatorstring
Operator used for comparison in alert evaluation.
LESS_THANGREATER_THANEQUALNOT_EQUALGREATER_THAN_OR_EQUALLESS_THAN_OR_EQUALIS_NULLIS_NOT_NULL
- thresholdobject
Threshold to user for alert evaluation, can be a column or a value.
Show child attributesHide child attributes
- columnobject
Show child attributesHide child attributes
- namestring
- displaystring
- aggregationstring
If not set, the behavior is equivalent to using
First rowin the UI.SUMCOUNTCOUNT_DISTINCTAVGMEDIANMINMAXSTDDEV
- valueobject
Show child attributesHide child attributes
- string_valuestring
- double_valuedouble
- bool_valueboolean
- notificationobject
User or Notification Destination to notify when alert is triggered.
Show child attributesHide child attributes
- subscriptionsarray of objectUnordered list
Show child attributesHide child attributes
- user_emailstring
- destination_idstring
- 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.
- notify_on_okboolean
Whether to notify alert subscribers when alert returns back to normal.
- statestringOutput only
Latest state of alert evaluation.
UNKNOWNTRIGGEREDOKERROR
- last_evaluated_atstringOutput only
Timestamp of the last evaluation.
- empty_result_statestring
Alert state if result is empty. Please avoid setting this field to be
UNKNOWNbecauseUNKNOWNstate is planned to be deprecated.UNKNOWNTRIGGEREDOKERROR
- 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.
UNPAUSEDPAUSED
- lifecycle_statestringOutput only
Indicates whether the query is trashed.
ACTIVEDELETED
- custom_summarystring
Custom summary for the alert. Interpreted according to
custom_template_format.
- custom_descriptionstring
Custom description for the alert. Interpreted according to
custom_template_format.
- 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_nameto the email of an active workspace user. Users can only set this to their own email. - For service principal: Set
service_principal_nameto the application ID. Requires theservicePrincipal/userrole. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
- user_namestring
The email of an active workspace user. Can only set this field to their own email.
- service_principal_namestring
Application ID of an active service principal. Setting this field requires the
servicePrincipal/userrole.
- For user identity: Set
- effective_run_asobjectOutput only
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_namestring
The email of an active workspace user. Can only set this field to their own email.
- service_principal_namestring
Application ID of an active service principal. Setting this field requires the
servicePrincipal/userrole.
- parametersarray of objectBetaUnordered list
A list of parameters to pass into the alert SQL query statement containing parameter markers. Static values only.
Reference a parameter in the query text as
:name. Each parameter must have a unique, non-empty name. Each parameter consists of a name, a value, and optionally a type. To represent a NULL value, thevaluefield may be omitted or set tonullexplicitly. If thetypefield is omitted, the value is interpreted as a string.If the type is given, parameters will be checked for type correctness according to the given type. A value is correct if the provided string can be converted to the requested type using the
castfunction. The exact semantics are described in the sectioncastfunction of the SQL language reference.Show child attributesHide child attributes
- namestringBeta
The name of the parameter. Reference it in the query text as
:name. Required, must be non-empty, and must be unique across the alert's parameters.
- valuestringBeta
The value bound to the parameter, represented as a string. If omitted, the value is interpreted as NULL.
- typestringBeta
The SQL data type of the parameter, for example
STRING,INT, orDECIMAL(10, 2). If no type is given the type is assumed to beSTRING. Complex types such asARRAY,MAP, andSTRUCTare not supported.
- custom_template_formatstringBeta
The format used to interpret the
custom_summaryandcustom_descriptiontemplates.HTMLtreats both templates as HTML with Mustache{{VARIABLE_NAME}}placeholders.MARKDOWNtreats them as Markdown with allowlisted@VARIABLE_NAMEplaceholders and converts them to the format each notification destination expects, so a single template renders correctly in email, Slack, and Microsoft Teams.When unset, the API applies no default. Responses omit the field unless a format is stored, and a template with no format is rendered as HTML.
HTMLMARKDOWN
Get an alert GA
GET
Gets an alert.
API scopes: alerts
Parameters
- idstringRequiredpath
Response
Returns the Alert object.
List alerts GA
GET
Gets a list of alerts accessible to the user, ordered by creation time.
API scopes: alerts
Parameters
- page_tokenstringquery
- page_sizeint32<= 100query
Response
Returns a list of Alert objects.
Create an alert GA
POST
Create Alert
API scopes: alerts
Request body
- display_namestringRequired
The display name of the alert.
- parent_pathstring
The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.
- query_textstringRequired
Text of the query to be run.
- warehouse_idstringRequired
ID of the SQL warehouse attached to the alert.
- run_as_user_namestringDeprecated
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_asfield instead. This field will be removed in a future release.
- evaluationobjectRequired
Show child attributesHide child attributes
- sourceobjectRequired
Source column from result to use to evaluate alert
Show child attributesHide child attributes
- namestringRequired
- displaystring
- aggregationstring
If not set, the behavior is equivalent to using
First rowin the UI.SUMCOUNTCOUNT_DISTINCTAVGMEDIANMINMAXSTDDEV
- comparison_operatorstringRequired
Operator used for comparison in alert evaluation.
LESS_THANGREATER_THANEQUALNOT_EQUALGREATER_THAN_OR_EQUALLESS_THAN_OR_EQUALIS_NULLIS_NOT_NULL
- thresholdobject
Threshold to user for alert evaluation, can be a column or a value.
Show child attributesHide child attributes
- columnobject
Show child attributesHide child attributes
- namestringRequired
- displaystring
- aggregationstring
If not set, the behavior is equivalent to using
First rowin the UI.SUMCOUNTCOUNT_DISTINCTAVGMEDIANMINMAXSTDDEV
- valueobject
Show child attributesHide child attributes
- string_valuestring
- double_valuedouble
- bool_valueboolean
- notificationobject
User or Notification Destination to notify when alert is triggered.
Show child attributesHide child attributes
- subscriptionsarray of objectUnordered list
Show child attributesHide child attributes
- user_emailstring
- destination_idstring
- 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.
- notify_on_okboolean
Whether to notify alert subscribers when alert returns back to normal.
- empty_result_statestring
Alert state if result is empty. Please avoid setting this field to be
UNKNOWNbecauseUNKNOWNstate is planned to be deprecated.UNKNOWNTRIGGEREDOKERROR
- scheduleobjectRequired
Show child attributesHide child attributes
- quartz_cron_schedulestringRequired
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_idstringRequired
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.
UNPAUSEDPAUSED
- custom_summarystring
Custom summary for the alert. Interpreted according to
custom_template_format.
- custom_descriptionstring
Custom description for the alert. Interpreted according to
custom_template_format.
- 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_nameto the email of an active workspace user. Users can only set this to their own email. - For service principal: Set
service_principal_nameto the application ID. Requires theservicePrincipal/userrole. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
- user_namestring
The email of an active workspace user. Can only set this field to their own email.
- service_principal_namestring
Application ID of an active service principal. Setting this field requires the
servicePrincipal/userrole.
- For user identity: Set
- parametersarray of objectBetaUnordered list
A list of parameters to pass into the alert SQL query statement containing parameter markers. Static values only.
Reference a parameter in the query text as
:name. Each parameter must have a unique, non-empty name. Each parameter consists of a name, a value, and optionally a type. To represent a NULL value, thevaluefield may be omitted or set tonullexplicitly. If thetypefield is omitted, the value is interpreted as a string.If the type is given, parameters will be checked for type correctness according to the given type. A value is correct if the provided string can be converted to the requested type using the
castfunction. The exact semantics are described in the sectioncastfunction of the SQL language reference.Show child attributesHide child attributes
- namestringRequiredBeta
The name of the parameter. Reference it in the query text as
:name. Required, must be non-empty, and must be unique across the alert's parameters.
- valuestringBeta
The value bound to the parameter, represented as a string. If omitted, the value is interpreted as NULL.
- typestringBeta
The SQL data type of the parameter, for example
STRING,INT, orDECIMAL(10, 2). If no type is given the type is assumed to beSTRING. Complex types such asARRAY,MAP, andSTRUCTare not supported.
- custom_template_formatstringBeta
The format used to interpret the
custom_summaryandcustom_descriptiontemplates.HTMLtreats both templates as HTML with Mustache{{VARIABLE_NAME}}placeholders.MARKDOWNtreats them as Markdown with allowlisted@VARIABLE_NAMEplaceholders and converts them to the format each notification destination expects, so a single template renders correctly in email, Slack, and Microsoft Teams.When unset, the API applies no default. Responses omit the field unless a format is stored, and a template with no format is rendered as HTML.
HTMLMARKDOWN
Response
Returns the Alert object.
Update an alert GA
PATCH
Update alert
API scopes: alerts
Parameters
- idstringRequiredIDImmutablepath
The canonical identifier of the alert to retrieve information about.
- update_maskstringRequiredquery
Request body
- display_namestringRequired
The display name of the alert.
- parent_pathstring
The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated.
- query_textstringRequired
Text of the query to be run.
- warehouse_idstringRequired
ID of the SQL warehouse attached to the alert.
- run_as_user_namestringDeprecated
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_asfield instead. This field will be removed in a future release.
- evaluationobjectRequired
Show child attributesHide child attributes
- sourceobjectRequired
Source column from result to use to evaluate alert
Show child attributesHide child attributes
- namestringRequired
- displaystring
- aggregationstring
If not set, the behavior is equivalent to using
First rowin the UI.SUMCOUNTCOUNT_DISTINCTAVGMEDIANMINMAXSTDDEV
- comparison_operatorstringRequired
Operator used for comparison in alert evaluation.
LESS_THANGREATER_THANEQUALNOT_EQUALGREATER_THAN_OR_EQUALLESS_THAN_OR_EQUALIS_NULLIS_NOT_NULL
- thresholdobject
Threshold to user for alert evaluation, can be a column or a value.
Show child attributesHide child attributes
- columnobject
Show child attributesHide child attributes
- namestringRequired
- displaystring
- aggregationstring
If not set, the behavior is equivalent to using
First rowin the UI.SUMCOUNTCOUNT_DISTINCTAVGMEDIANMINMAXSTDDEV
- valueobject
Show child attributesHide child attributes
- string_valuestring
- double_valuedouble
- bool_valueboolean
- notificationobject
User or Notification Destination to notify when alert is triggered.
Show child attributesHide child attributes
- subscriptionsarray of objectUnordered list
Show child attributesHide child attributes
- user_emailstring
- destination_idstring
- 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.
- notify_on_okboolean
Whether to notify alert subscribers when alert returns back to normal.
- empty_result_statestring
Alert state if result is empty. Please avoid setting this field to be
UNKNOWNbecauseUNKNOWNstate is planned to be deprecated.UNKNOWNTRIGGEREDOKERROR
- scheduleobjectRequired
Show child attributesHide child attributes
- quartz_cron_schedulestringRequired
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_idstringRequired
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.
UNPAUSEDPAUSED
- custom_summarystring
Custom summary for the alert. Interpreted according to
custom_template_format.
- custom_descriptionstring
Custom description for the alert. Interpreted according to
custom_template_format.
- 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_nameto the email of an active workspace user. Users can only set this to their own email. - For service principal: Set
service_principal_nameto the application ID. Requires theservicePrincipal/userrole. If not specified, the alert will run as the request user.
Show child attributesHide child attributes
- user_namestring
The email of an active workspace user. Can only set this field to their own email.
- service_principal_namestring
Application ID of an active service principal. Setting this field requires the
servicePrincipal/userrole.
- For user identity: Set
- parametersarray of objectBetaUnordered list
A list of parameters to pass into the alert SQL query statement containing parameter markers. Static values only.
Reference a parameter in the query text as
:name. Each parameter must have a unique, non-empty name. Each parameter consists of a name, a value, and optionally a type. To represent a NULL value, thevaluefield may be omitted or set tonullexplicitly. If thetypefield is omitted, the value is interpreted as a string.If the type is given, parameters will be checked for type correctness according to the given type. A value is correct if the provided string can be converted to the requested type using the
castfunction. The exact semantics are described in the sectioncastfunction of the SQL language reference.Show child attributesHide child attributes
- namestringRequiredBeta
The name of the parameter. Reference it in the query text as
:name. Required, must be non-empty, and must be unique across the alert's parameters.
- valuestringBeta
The value bound to the parameter, represented as a string. If omitted, the value is interpreted as NULL.
- typestringBeta
The SQL data type of the parameter, for example
STRING,INT, orDECIMAL(10, 2). If no type is given the type is assumed to beSTRING. Complex types such asARRAY,MAP, andSTRUCTare not supported.
- custom_template_formatstringBeta
The format used to interpret the
custom_summaryandcustom_descriptiontemplates.HTMLtreats both templates as HTML with Mustache{{VARIABLE_NAME}}placeholders.MARKDOWNtreats them as Markdown with allowlisted@VARIABLE_NAMEplaceholders and converts them to the format each notification destination expects, so a single template renders correctly in email, Slack, and Microsoft Teams.When unset, the API applies no default. Responses omit the field unless a format is stored, and a template with no format is rendered as HTML.
HTMLMARKDOWN
Response
Returns the Alert object.