Enable a rule
To enable a rule, you must have all
privileges for the appropriate Kibana features, depending on the consumer
and rule_type_id
of the rule. For example, the Management > Stack Rules feature, Analytics > Discover and Machine Learning features, Observability, and Security features. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs.
Path parameters
-
An identifier for the rule.
POST /api/alerting/rule/{ruleId}/_enable
curl \
-X POST https://localhost:5601/api/alerting/rule/ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74/_enable \
-H "kbn-xsrf: string"
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Response examples (404)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}