Get the Elasticsearch query for a rule
Server:
https://{kibana_url}
- GET /api/alerting/rule/{id}/query_inspector
Returns the Elasticsearch query that a rule executes, and optionally its response.
Path Parameters
-
idstringrequired -
The identifier for the rule.
Query Parameters
-
mode· default: build The inspection mode. Use "build" to return only the query, or "execute" to run the query and include the response.
-
Values:
buildexecute -
alert_idstring The alert document ID. When provided, the query inspector uses the evaluation time range from the alert instead of the current time.
Responses
Indicates a successful call.
400
Indicates the rule type is not supported or the request parameters are invalid.
404
Indicates a rule with the specified rule ID does not exist.