- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 8.0
- Kibana concepts
- Quick start
- Set up
- Install Kibana
- Configure Kibana
- Alerting and action settings
- APM settings
- Banners settings
- Enterprise Search settings
- Fleet settings
- i18n settings
- Logging settings
- Logs settings
- Metrics settings
- Monitoring settings
- Reporting settings
- Search sessions settings
- Secure settings
- Security settings
- Spaces settings
- Task Manager settings
- Telemetry settings
- URL drilldown settings
- Start and stop Kibana
- Access Kibana
- Securing access to Kibana
- Add data
- Upgrade Kibana
- Configure security
- Configure reporting
- Configure logging
- Configure monitoring
- Command line tools
- Production considerations
- Discover
- Dashboard and visualizations
- Canvas
- Maps
- Build a map to compare metrics by country or region
- Track, visualize, and alert on assets in real time
- Map custom regions with reverse geocoding
- Heat map layer
- Tile layer
- Vector layer
- Plot big data
- Search geographic data
- Configure map settings
- Connect to Elastic Maps Service
- Import geospatial data
- Troubleshoot
- Reporting and sharing
- Machine learning
- Graph
- Alerting
- Observability
- APM
- Security
- Dev Tools
- Fleet
- Osquery
- Stack Monitoring
- Stack Management
- REST API
- Get features API
- Kibana spaces APIs
- Kibana role management APIs
- User session management APIs
- Saved objects APIs
- Data views API
- Index patterns APIs
- Alerting APIs
- Action and connector APIs
- Cases APIs
- Import and export dashboard APIs
- Logstash configuration management APIs
- Machine learning APIs
- Short URLs APIs
- Get Task Manager health
- Upgrade assistant APIs
- Kibana plugins
- Accessibility
- Release notes
- Developer guide
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Find rules API
editFind rules API
editRetrieve a paginated set of rules based on condition.
As rules change in Kibana, the results on each page of the response also change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.
Request
editGET <kibana host>:<port>/api/alerting/rules/_find
GET <kibana host>:<port>/s/<space_id>/api/alerting/rules/_find
Path parameters
edit-
space_id
-
(Optional, string) An identifier for the space. If
space_id
is not provided in the URL, the default space is used.
Query Parameters
editRule params
are stored as a flattened field type and analyzed as keywords.
-
per_page
- (Optional, number) The number of rules to return per page.
-
page
- (Optional, number) The page number.
-
search
- (Optional, string) An Elasticsearch simple_query_string query that filters the rules in the response.
-
default_search_operator
-
(Optional, string) The operator to use for the
simple_query_string
. The default is OR. -
search_fields
-
(Optional, array|string) The fields to perform the
simple_query_string
parsed query against. -
fields
-
(Optional, array of strings) The fields to return in the
attributes
key of the response. -
sort_field
-
(Optional, string) Sorts the response. Could be a rule field returned in the
attributes
key of the response. -
sort_order
-
(Optional, string) Sort direction, either
asc
ordesc
. -
has_reference
- (Optional, object) Filters the rules that have a relation with the reference objects with the specific "type" and "ID".
-
filter
-
(Optional, string) 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 as
updatedAt
, you will have to define your filter, for example, savedObjectType.updatedAt > 2018-12-22.
Response code
edit-
200
- Indicates a successful call.
Examples
editFind rules with names that start with my
:
$ curl -X GET api/alerting/rules/_find?search_fields=name&search=my*
The API returns the following:
{ "page": 1, "per_page": 10, "total": 1, "data": [ { "id": "0a037d60-6b62-11eb-9e0d-85d233e3ee35", "notify_when": "onActionGroupChange", "params": { "aggType": "avg", }, "consumer": "alerts", "rule_type_id": "test.rule.type", "schedule": { "interval": "1m" }, "actions": [], "tags": [], "name": "my test rule", "enabled": true, "throttle": null, "api_key_owner": "elastic", "created_by": "elastic", "updated_by": "elastic", "mute_all": false, "muted_alert_ids": [], "updated_at": "2021-02-10T05:37:19.086Z", "created_at": "2021-02-10T05:37:19.086Z", "scheduled_task_id": "0b092d90-6b62-11eb-9e0d-85d233e3ee35", "execution_status": { "last_execution_date": "2021-02-10T17:55:14.262Z", "status": "ok" } }, ] }
For parameters that accept multiple values (e.g. fields
), repeat the
query parameter for each value:
$ curl -X GET api/alerting/rules/_find?fields=id&fields=name
Was this helpful?
Thank you for your feedback.