We would like to allow users the ability to delete their alerts based on certain configuration conditions. To do this, we would like to create a new task type that is scheduled ad-hoc using an HTTP API. This ability will be controlled by a new rules settings subfeature privilege. This issue addresses the API that is required to ad-hoc schedule the task created in https://github.com/elastic/kibana/issues/208615
API
We need the following HTTP APIs
Internal APIs to support getting and setting the new rules setting
Internal API to "preview" an alert deletion task and return the number of alerts that would be deleted if the task ran
Internal API to retrieve the last time the alert deletion task was run for the given space
The following API can start as internal but do we want to make it public in the future so users can pass multiple spaces?
API to schedule an ad-hoc run of the new alert deletion task - this API should accept an optional list of spaces in addition to the current space; if a list of spaces is supplied, the feature privilege for the user in all of those spaces should be checked before scheduling the task for multiple spaces
All of these APIs should check that the requesting user has the correct rules setting feature privilege.
Blocked by https://github.com/elastic/kibana/issues/208615
We would like to allow users the ability to delete their alerts based on certain configuration conditions. To do this, we would like to create a new task type that is scheduled ad-hoc using an HTTP API. This ability will be controlled by a new rules settings subfeature privilege. This issue addresses the API that is required to ad-hoc schedule the task created in https://github.com/elastic/kibana/issues/208615
API
We need the following HTTP APIs
The following API can start as internal but do we want to make it public in the future so users can pass multiple spaces?
All of these APIs should check that the requesting user has the correct rules setting feature privilege.
Definition of done