Security detections
Use the detections APIs to create and manage detection rules. Detection rules search events and external alerts sent to Elastic Security and generate detection alerts from any hits. Alerts are displayed on the Alerts page and can be assigned and triaged, using the alert status to mark them as open, closed, or acknowledged.
This API supports both key-based authentication and basic authentication.
To use key-based authentication, create an API key, then specify the key in the header of your API calls.
To use basic authentication, provide a username and password; this automatically creates an API key that matches the current user’s privileges.
In both cases, the API key is subsequently used for authorization when the rule runs.
warn If the API key used for authorization has different privileges than the key that created or most recently updated a rule, the rule behavior might change.
If the API key that created a rule is deleted, or the user that created the rule becomes inactive, the rule will stop running.
To create and run rules, the user must meet specific requirements for the Kibana space. Refer to the Detections requirements for a complete list of requirements.
20 endpoints
-
Assign and unassign users from attack discovery alerts
- POST /api/detection_engine/attacks/assignees
-
Find and/or aggregate attack discovery alerts
- POST /api/detection_engine/attacks/search
-
Set attack discovery alerts workflow status
- POST /api/detection_engine/attacks/status
-
Add and remove attack discovery alert tags
- POST /api/detection_engine/attacks/tags
-
Returns user privileges for the Kibana space
- GET /api/detection_engine/privileges
-
Delete a detection rule
- DELETE /api/detection_engine/rules
-
Retrieve a detection rule
- GET /api/detection_engine/rules
-
Patch a detection rule
- PATCH /api/detection_engine/rules
-
Create a detection rule
- POST /api/detection_engine/rules
-
Update a detection rule
- PUT /api/detection_engine/rules
-
Apply a bulk action to detection rules
- POST /api/detection_engine/rules/_bulk_action
-
Export detection rules
- POST /api/detection_engine/rules/_export
-
List all detection rules
- GET /api/detection_engine/rules/_find
-
Import detection rules
- POST /api/detection_engine/rules/_import
-
Preview rule alerts generated on specified time range
- POST /api/detection_engine/rules/preview
-
Assign and unassign users from detection alerts
- POST /api/detection_engine/signals/assignees
-
Find and/or aggregate detection alerts
- POST /api/detection_engine/signals/search
-
Set a detection alert status
- POST /api/detection_engine/signals/status
-
Add and remove detection alert tags
- POST /api/detection_engine/signals/tags
-
List all detection rule tags
- GET /api/detection_engine/tags