Create an exception list item

POST /api/exception_lists/items

Create an exception item and associate it with the specified exception list.

Before creating exception items, you must create an exception list.

application/json

Body Required

Exception list item's properties

  • comments array[object]
    Hide comments attribute Show comments attribute object
    • comment string(nonempty) Required

      A string that does not contain only whitespace characters

      Minimum length is 1.

  • description string Required

    Describes the exception list.

  • entries array[object] Required
    Any of:
  • expire_time string(date-time)

    The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.

  • item_id string(nonempty)

    Human readable string identifier, e.g. trusted-linux-processes

    Minimum length is 1.

  • list_id string(nonempty) Required

    The exception list's human readable string identifier, endpoint_list.

    Minimum length is 1.

  • meta object

    Additional properties are allowed.

  • name string(nonempty) Required

    Exception list name.

    Minimum length is 1.

  • namespace_type string

    Determines whether the exception container is available in all Kibana spaces or just the space in which it is created, where:

    • single: Only available in the Kibana space in which it is created.
    • agnostic: Available in all Kibana spaces.

    Values are agnostic or single.

  • os_types array[string]

    Use this field to specify the operating system.

    Values are linux, macos, or windows.

  • tags array[string(nonempty)]

    String array containing words and phrases to help categorize exception items.

    Minimum length of each is 1.

  • type string Required

    Value is simple.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • _version string

      The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version.

    • comments array[object] Required

      Array of comment fields:

      • comment (string): Comments about the exception item.
      Hide comments attributes Show comments attributes object
      • comment string(nonempty) Required

        A string that does not contain only whitespace characters

        Minimum length is 1.

      • created_at string(date-time) Required

        Autogenerated date of object creation.

      • created_by string(nonempty) Required

        A string that does not contain only whitespace characters

        Minimum length is 1.

      • id string(nonempty) Required

        A string that does not contain only whitespace characters

        Minimum length is 1.

      • updated_at string(date-time)

        Autogenerated date of last object update.

      • updated_by string(nonempty)

        A string that does not contain only whitespace characters

        Minimum length is 1.

    • created_at string(date-time) Required

      Autogenerated date of object creation.

    • created_by string Required

      Autogenerated value - user that created object.

    • description string Required

      Describes the exception list.

    • entries array[object] Required
      Any of:
    • expire_time string(date-time)

      The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions.

    • id string(nonempty) Required

      Exception's identifier.

      Minimum length is 1.

    • item_id string(nonempty) Required

      Human readable string identifier, e.g. trusted-linux-processes

      Minimum length is 1.

    • list_id string(nonempty) Required

      The exception list's human readable string identifier, endpoint_list.

      Minimum length is 1.

    • meta object

      Additional properties are allowed.

    • name string(nonempty) Required

      Exception list name.

      Minimum length is 1.

    • namespace_type string Required

      Determines whether the exception container is available in all Kibana spaces or just the space in which it is created, where:

      • single: Only available in the Kibana space in which it is created.
      • agnostic: Available in all Kibana spaces.

      Values are agnostic or single.

    • os_types array[string]

      Use this field to specify the operating system.

      Values are linux, macos, or windows.

    • tags array[string(nonempty)]

      String array containing words and phrases to help categorize exception items.

      Minimum length of each is 1.

    • tie_breaker_id string Required

      Field used in search to ensure all containers are sorted and returned correctly.

    • type string Required

      Value is simple.

    • updated_at string(date-time) Required

      Autogenerated date of last object update.

    • updated_by string Required

      Autogenerated value - user that last updated object.

  • 400 application/json

    Invalid input data response

    One of:
  • 401 application/json

    Unsuccessful authentication response

    Hide response attributes Show response attributes object
    • error string Required
    • message string Required
    • statusCode integer Required
  • 403 application/json

    Not enough privileges response

    Hide response attributes Show response attributes object
    • error string Required
    • message string Required
    • statusCode integer Required
  • 409 application/json

    Exception list item already exists response

    Hide response attributes Show response attributes object
    • message string Required
    • status_code integer Required
  • 500 application/json

    Internal server error response

    Hide response attributes Show response attributes object
    • message string Required
    • status_code integer Required
POST /api/exception_lists/items
curl \ --request POST 'https://<KIBANA_URL>/api/exception_lists/items' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --data '{"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
{ "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": "323faa75-c657-4fa0-9084-8827612c207b", "name": "Sample Autogenerated Exception List Item ID", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "exists", "field": "actingProcess.file.signer", "operator": "excluded" } ], "item_id": "80e6edf7-4b13-4414-858f-2fa74aa52b37", "list_id": "8c1aae4c-1ef5-4bce-a2e3-16584b501783", "_version": "WzYsMV0=", "comments": [], "os_types": [], "created_at": "2025-01-09T01:16:23.322Z", "created_by": "elastic", "updated_at": "2025-01-09T01:16:23.322Z", "updated_by": "elastic", "description": "This is a sample exception that has no item_id so it is autogenerated.", "namespace_type": "single", "tie_breaker_id": "d6799986-3a23-4213-bc6d-ed9463a32f23" }
{ "id": "71a9f4b2-c85c-49b4-866f-c71eb9e67da2", "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "exists", "field": "actingProcess.file.signer", "operator": "excluded" } ], "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" }
{ "id": "71a9f4b2-c85c-49b4-866f-c71eb9e67da2", "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "exists", "field": "actingProcess.file.signer", "operator": "excluded" } ], "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" }
{ "id": "71a9f4b2-c85c-49b4-866f-c71eb9e67da2", "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "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" }
{ "id": "71a9f4b2-c85c-49b4-866f-c71eb9e67da2", "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "match", "field": "actingProcess.file.signer", "value": "Elastic N.V.", "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" }
{ "id": "71a9f4b2-c85c-49b4-866f-c71eb9e67da2", "name": "Sample Exception List Item", "tags": [ "malware" ], "type": "simple", "entries": [ { "type": "nested", "field": "file.signature", "entries": [ { "type": "match", "field": "signer", "value": "Evil", "operator": "included" }, { "type": "match", "field": "trusted", "value": true, "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" }
{ "id": "deb26876-297d-4677-8a1f-35467d2f1c4f", "name": "Filter out good guys ip and agent.name rock01", "tags": [ "malware" ], "type": "simple", "entries": [ { "list": { "id": "goodguys.txt", "type": "ip" }, "type": "list", "field": "source.ip", "operator": "excluded" } ], "item_id": "686b129e-9b8d-4c59-8d8d-c93a9ea82c71", "list_id": "8c1aae4c-1ef5-4bce-a2e3-16584b501783", "_version": "WzcsMV0=", "comments": [], "os_types": [], "created_at": "2025-01-09T01:31:12.614Z", "created_by": "elastic", "updated_at": "2025-01-09T01:31:12.614Z", "updated_by": "elastic", "description": "Don't signal when agent.name is rock01 and source.ip is in the goodguys.txt list", "namespace_type": "single", "tie_breaker_id": "5e0288ce-6657-4c18-9dcc-00ec9e8cc6c8" }
Response examples (400)
{ "error": "Bad Request,", "message": "[request body]: list_id: Expected string, received number", "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)
{ "error": "Forbidden", "message": "API [POST /api/exception_lists/items] is unauthorized for user, this action is granted by the Kibana privileges [lists-all]", "statusCode": 403 }
Response examples (409)
{ "message": "exception list item id: \\\"simple_list_item\\\" already exists", "status_code": 409 }
Response examples (500)
{ "message": "Internal Server Error", "status_code": 500 }