Create default exception list for a rule
editCreate default exception list for a rule
editCreates a default exception list for the rule you specify.
To add exception items to a default exception list, pass in exceptions items that you want applied to the rule. Refer to Create exceptions for a rule for more information.
When an exception item’s query evaluates to true
, the associated rule does not issue alerts even when its other criteria are met.
Default exception lists do not display on the Shared Exception Lists page in the Elastic Security app UI; they only appear in the Rule exceptions on the rule details page. This is because default exception lists can only be associated with a single rule. Refer to View and manage exceptions to learn more.
Request URL
editPOST <kibana host>:<port>/api/detection_engine/<rule_id>/exceptions
Request body
editA JSON object with these fields:
Name | Type | Description | Required |
---|---|---|---|
|
String |
Describes the exception list. |
Yes |
|
String |
Unique identifier. |
No, automatically created when it is not provided. |
|
Object |
Placeholder for metadata about the exception list. |
No |
|
String |
The exception list’s name. |
Yes |
|
String |
Determines whether the exception list is available in all Kibana spaces or just the space in which it is created, where:
|
No, defaults to |
|
String[] |
String array containing words and phrases to help categorize exception lists. |
No |
|
String |
The type of exception, which must be:
|
Yes |
Example requests
editCreates an exception list for holding trusted Linux process exception items:
POST api/detection_engine/<rule_id>/exceptions { "description": "Excludes Linux trusted processes", "name": "Linux process exceptions", "list_id": "trusted-linux-processes", "type": "detection", "namespace_type": "single", "tags": [ "linux", "processes" ] }
Response code
edit-
200
- Indicates a successful call.
Response payload
editThe exception list object with a unique ID.
{ "_tags": [], "created_at": "2020-07-13T09:33:46.187Z", "created_by": "elastic", "description": "Excludes Linux trusted processes", "id": "f320c070-c4eb-11ea-80bb-11861bae2798", "list_id": "trusted-linux-processes", "name": "Linux process exceptions", "namespace_type": "single", "tags": [ "linux", "processes" ], "tie_breaker_id": "2c08d5a5-2ecc-4d5a-acfb-0a367f25b3f3", "type": "detection", "updated_at": "2020-07-13T09:33:46.359Z", "updated_by": "elastic" }
The highlighted values can help you identify detection rules associated with the exception list: