Create rule exception items
Create exception items that apply to a single detection rule.
POST /api/detection_engine/rules/{id}/exceptions
curl \ --request POST 'https://<KIBANA_URL>/api/detection_engine/rules/330bdd28-eedf-40e1-bed0-f10176c7f9e0/exceptions' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --data '{"items":[{"name":"Sample Exception List Item","tags":["malware"],"type":"simple","entries":[{"type":"exists","field":"actingProcess.file.signer","operator":"excluded"},{"type":"match_any","field":"host.name","value":["saturn","jupiter"],"operator":"included"}],"item_id":"simple_list_item","list_id":"simple_list","os_types":["linux"],"description":"This is a sample detection type exception item.","namespace_type":"single"}]}'
Request example
{ "items": [ { "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "exists", "field": "actingProcess.file.signer", "operator": "excluded" }, { "type": "match_any", "field": "host.name", "value": [ "saturn", "jupiter" ], "operator": "included" } ], "item_id": "simple_list_item", "list_id": "simple_list", "os_types": [ "linux" ], "description": "This is a sample detection type exception item.", "namespace_type": "single" } ] }
Response examples (200)
[ { "id": "71a9f4b2-c85c-49b4-866f-c71eb9e67da2", "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "exists", "field": "actingProcess.file.signer", "operator": "excluded" }, { "type": "match_any", "field": "host.name", "value": [ "saturn", "jupiter" ], "operator": "included" } ], "item_id": "simple_list_item", "list_id": "simple_list", "_version": "WzQsMV0=", "comments": [], "os_types": [ "linux" ], "created_at": "2025-01-07T20:07:33.119Z", "created_by": "elastic", "updated_at": "2025-01-07T20:07:33.119Z", "updated_by": "elastic", "description": "This is a sample detection type exception item.", "namespace_type": "single", "tie_breaker_id": "09434836-9db9-4942-a234-5a9268e0b34c" } ]
Response examples (400)
Bad payload
{ "error": "Bad Request", "message": "Invalid request payload JSON format", "statusCode": 400 }
{ "error": "Bad Request", "message": "[request params]: id: Invalid uuid", "statusCode": 400 }
Response examples (401)
{ "error": "Unauthorized", "message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]", "statusCode": 401 }
Response examples (403)
{ "message": "Unable to create exception-list", "status_code": 403 }
Response examples (500)
{ "message": "Internal Server Error", "status_code": 500 }