Delete a detection rule

DELETE /api/detection_engine/rules

Delete a detection rule using the rule_id or id field.

The URL query must include one of the following:

  • id - DELETE /api/detection_engine/rules?id=<id>
  • rule_id- DELETE /api/detection_engine/rules?rule_id=<rule_id>

The difference between the id and rule_id is that the id is a unique rule identifier that is randomly generated when a rule is created and cannot be set, whereas rule_id is a stable rule identifier that can be assigned during rule creation.

Query parameters

  • id string(uuid)

    The rule's id value.

  • rule_id string

    The rule's rule_id value.

Responses

  • 200 application/json

    Indicates a successful call.

    Any of:
DELETE /api/detection_engine/rules
curl \
  --request DELETE https://localhost:5601/api/detection_engine/rules?rule_id=bfeaf89b-a2a7-48a3-817f-e41829dc61ee \
  --header "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
OSZAR »