Get information about rules
https://{kibana_url}
- GET /api/alerting/rules/_find
Query Parameters
-
per_pagenumber · min: 0 · default: 10 The number of rules to return per page.
-
pagenumber · min: 1 · default: 1 The page number to return.
-
searchstring An Elasticsearch simple_query_string query that filters the objects in the response.
-
default_search_operator· default: OR The default operator to use for the simple_query_string.
-
Values:
ORAND -
search_fieldsstring The fields to perform the simple_query_string parsed query against.
-
sort_fieldstring Determines which field is used to sort the results. The field must exist in the
attributeskey of the response.-
has_referenceobject Filters the rules that have a relation with the reference objects with a specific type and identifier.
-
fieldsstring The fields to return in the
attributeskey of the response.-
filterstring A KQL string that you filter with an attribute from your saved object. It should look like
savedObjectType.attributes.title: "myTitle". However, if you used a direct attribute of a saved object, such asupdatedAt, you must define your filter, for example,savedObjectType.updatedAt > 2018-12-22.-
filter_consumersstring Filters the returned rules by the consumer (Kibana application) that owns them, for example:
siem,apm,infrastructure.
Responses
Indicates a successful call.
-
dataobjectrequired -
actionsobjectrequired -
alerts_filterobject -
Defines a period that limits whether the action runs.
-
timeframeobject -
daysrequired -
Defines the days of the week that the action can run, represented as an array of numbers. For example,
1represents Monday. An empty array is equivalent to specifying all the days of the week. -
Values:
1234567 -
hoursobjectrequired -
timezonestringrequired -
The ISO time zone for the
hoursvalues. Values such asUTCandUTC+1also work but lack built-in support for daylight savings time and are not recommended. -
connector_type_idstringrequired -
The type of connector. This property appears in responses but cannot be set in requests.
-
frequencyobject -
notify_whenrequired -
Indicates how frequently rule actions are triggered. Valid values include:
onActionGroupChange: Actions run when the alert status changes;onActiveAlert: Actions run when the alert becomes active and at each check interval while the rule conditions are met;onThrottleInterval: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. You cannot specifynotify_whenat both the rule and action level. The recommended approach is to set it for each action individually. If you setnotify_whenat the rule level and then edit the rule, it will automatically be converted to action-specific values. -
Values:
onActionGroupChangeonActiveAlertonThrottleInterval -
summarybooleanrequired -
Indicates whether the action is a summary.
-
throttlestring · default: nullnullable -
The throttle interval defines how frequently rule actions are triggered. It is specified in seconds, minutes, hours, or days and only applies when 'notify_when' is set to 'onThrottleInterval'. You cannot set the throttle interval at both the rule and action level. The recommended approach is to set it for each action individually. If you set the throttle interval at the rule level and then edit the rule, it will automatically be converted to action-specific values.
-
groupstring -
The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to
default. -
idstringrequired -
The identifier for the connector saved object.
-
paramsmap string to objectrequired -
The parameters for the action, which are sent to the connector. The
paramsare handled as Mustache templates and passed a default set of context. -
use_alert_data_for_templateboolean -
Indicates whether to use alert data as a template.
-
uuidstring -
A universally unique identifier (UUID) for the action.
-
alert_delayobject -
Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions.
-
activenumberrequired -
The number of consecutive runs that must meet the rule conditions.
-
api_key_created_by_userbooleannullable -
Indicates whether the API key that is associated with the rule was created by the user.
-
api_key_ownerstring · default: nullnullable -
The owner of the API key that is associated with the rule and used to run background tasks.
-
artifactsobject -
dashboardsobject -
idstringrequired -
investigation_guideobject -
blobstringrequired -
User-created content that describes alert causes and remediation.
-
consumerstringrequired -
The name of the application or feature that owns the rule. For example:
alerts,apm,discover,infrastructure,logs,metrics,ml,monitoring,securitySolution,siem,stackAlerts, oruptime. -
created_atstringrequired -
The date and time that the rule was created.
-
created_bystring · default: nullnullable -
The identifier for the user that created the rule.
-
enabledbooleanrequired -
Indicates whether you want the rule to run on an interval basis after it is created.
-
execution_statusobjectrequired -
errorobject -
last_durationnumber -
Duration of last rule execution.
-
last_execution_datestringrequired -
The date and time of the last rule execution.
-
flapping -
enabledboolean -
Determines whether the rule can enter the flapping state. By default, rules can enter the flapping state.
-
look_back_windownumber · min: 2 · max: 20required -
The minimum number of runs in which the threshold must be met.
-
status_change_thresholdnumber · min: 2 · max: 20required -
The minimum number of times an alert must switch states within the defined look back window time.
-
idstringrequired -
The identifier for the rule.
-
last_runobjectnullable -
alerts_countobjectrequired -
outcomerequired -
Outcome of the last rule run. Value can be succeeded, warning, or failed.
-
Values:
succeededwarningfailed -
outcome_msgstringnullable -
outcome_ordernumber -
Order of the outcome.
-
warningnullable -
Warning of last rule execution.
-
Values:
readdecryptexecuteunknownlicensetimeoutdisabledvalidatemaxExecutableActionsmaxAlertsmaxQueuedActionsruleExecutionnull -
mapped_paramsmap string to object -
mute_allbooleanrequired -
Indicates whether all alerts are muted.
-
muted_alert_idsstringrequired -
namestringrequired -
The name of the rule.
-
next_runstringnullable -
Date and time of the next rule run.
-
notify_whennullable -
Indicates how frequently rule actions are triggered. Valid values include:
onActionGroupChange: Actions run when the alert status changes;onActiveAlert: Actions run when the alert becomes active and at each check interval while the rule conditions are met;onThrottleInterval: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. You cannot specifynotify_whenat both the rule and action level. The recommended approach is to set it for each action individually. If you setnotify_whenat the rule level and then edit the rule, it will automatically be converted to action-specific values. -
Values:
onActionGroupChangeonActiveAlertonThrottleIntervalnull -
paramsmap string to objectrequired -
The parameters for the rule.
-
revisionnumberrequired -
The rule revision number.
-
rule_type_idstringrequired -
The rule type identifier.
-
runningbooleannullable -
Indicates whether the rule is running.
-
scheduleobjectrequired -
intervalstringrequired -
The interval is specified in seconds, minutes, hours, or days.
-
scheduled_task_idstring -
Identifier of the scheduled task.
-
throttlestringnullable deprecated -
Deprecated in 8.13.0. Use the
throttleproperty in the actionfrequencyobject instead. The throttle interval, which defines how frequently rule actions are triggered. You cannot specify the throttle interval at both the rule and action level. If you set the throttle interval at the rule level and then edit the rule, it will automatically be converted to action-specific values. -
updated_atstringrequired -
The date and time of the latest updates to the rule.
-
updated_bystring · default: nullnullable -
The identifier for the user who was the last to update the rule.
-
pagenumberrequired -
per_pagenumberrequired -
totalnumberrequired
Indicates an invalid schema or parameters.
Indicates that this call is forbidden.