Delete rules matching a query (dry-run by default)
- Base URL
-
https://{kibana_url}
- POST /api/alerting/v2/rules/_delete_by_query
Required authorization
- Privileges manage_alerting-v2-rules
Request body
-
filterstring · min length: 1 · max length: 4096 -
KQL filter string to match target resources. At most 10000 matching resources are processed per request. Cannot be empty; to target every resource use
match_all: true. -
forceboolean · default: false -
When true, executes the operation. When false (default), returns a dry-run preview with
match_countand asampleof matching resource IDs so the client can verify before committing.
Responses
Returns a dry-run preview by default, or the executed operation when force is true.
Any of:
Indicates an invalid schema or parameters.
Indicates the request was not authenticated.
Indicates the user does not have the required privileges to perform the request.
Indicates an unexpected server-side error.
Indicates the alerting engine is disabled by the alerting:v2:enabled advanced setting.