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.
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.
Endpoints
20 endpoints
-
POST
Assign and unassign users from attack discovery alerts
/api /detection_engine /attacks /assignees -
POST
Find and/or aggregate attack discovery alerts
/api /detection_engine /attacks /search -
POST
Set attack discovery alerts workflow status
/api /detection_engine /attacks /status -
POST
Add and remove attack discovery alert tags
/api /detection_engine /attacks /tags -
GET
Returns user privileges for the Kibana space
/api /detection_engine /privileges -
GET
Retrieve a detection rule
/api /detection_engine /rules -
POST
Create a detection rule
/api /detection_engine /rules -
PUT
Update a detection rule
/api /detection_engine /rules -
PATCH
Patch a detection rule
/api /detection_engine /rules -
DELETE
Delete a detection rule
/api /detection_engine /rules -
POST
Apply a bulk action to detection rules
/api /detection_engine /rules /_bulk_action -
POST
Export detection rules
/api /detection_engine /rules /_export -
GET
List all detection rules
/api /detection_engine /rules /_find -
POST
Import detection rules
/api /detection_engine /rules /_import -
POST
Preview rule alerts generated on specified time range
/api /detection_engine /rules /preview -
POST
Assign and unassign users from detection alerts
/api /detection_engine /signals /assignees -
POST
Find and/or aggregate detection alerts
/api /detection_engine /signals /search -
POST
Set a detection alert status
/api /detection_engine /signals /status -
POST
Add and remove detection alert tags
/api /detection_engine /signals /tags -
GET
List all detection rule tags
/api /detection_engine /tags