Host isolation exceptionsedit
Create, retrieve, update, and delete endpoint host isolation exceptions via API. Host isolation exceptions are managed via the Exceptions API using a static container id (list_id
) of endpoint_host_isolation_exceptions
, which must be created prior to adding the host isolation exceptions. Access to these APIs requires that a user has authorization to manage endpoints.
Create host isolation exceptions containeredit
POST <kibana host>:<port>/api/exception_lists
Request bodyedit
A JSON object containing the fields listed below. The request must have the following:
-
The
list_id
value must beendpoint_host_isolation_exceptions
. -
The
namespace_type
value must beagnostic
. -
The
type
value must beendpoint
.
Name | Type | Description | Required |
---|---|---|---|
|
String |
Describes the host isolation exceptions container. |
Yes |
|
String |
Must be set to |
Yes |
|
Object |
Placeholder for metadata about the list container. |
No |
|
String |
The host isolation exceptions container’s name. |
Yes |
|
String |
Must be set to |
Yes |
|
String[] |
String array containing words and phrases to help categorize the host isolation exceptions container. |
No |
|
String |
Must be set to |
Yes |
Example requestedit
POST api/exception_lists { "description": "Elastic Defend Host Isolation Exceptions List", "name": "Elastic Defend Host Isolation Exceptions List", "list_id": "endpoint_host_isolation_exceptions", "type": "endpoint", "namespace_type": "agnostic" }
Response codeedit
-
200
- Indicates a successful call.
Response payloadedit
{ "_version": "WzIxMTgsMV0=", "created_at": "2022-03-03T13:55:32.176Z", "created_by": "elastic", "description": "Elastic Defend Host Isolation Exceptions List", "id": "978cbd00-9af9-11ec-94b1-fd7e90cc2a08", "immutable": false, "list_id": "endpoint_host_isolation_exceptions", "name": "Elastic Defend Host Isolation Exceptions List", "namespace_type": "agnostic", "os_types": [], "tags": [], "tie_breaker_id": "9894ae5c-2ce0-47dc-8c52-784ca2219fc3", "type": "endpoint", "updated_at": "2022-03-03T13:55:32.178Z", "updated_by": "elastic", "version": 1 }
Create host isolation exceptionedit
POST <kibana host>:<port>/api/exception_lists/items
Request bodyedit
A JSON object containing the fields listed below. The request must have the following:
-
The
list_id
value must beendpoint_host_isolation_exceptions
. -
The
namespace_type
value must beagnostic
. -
The
type
value must besimple
. -
os_types
must be an array with allos_types
values
Name | Type | Description | Required |
---|---|---|---|
|
comment[] |
Array of |
No, defaults to empty array. |
|
String |
Describes the host isolation exception item. |
Yes |
|
entry[] |
Array containing the host isolation exception query conditions. See |
Yes. |
|
String |
Must be set to |
Yes |
|
String |
Unique identifier of the exception item. |
No, automatically created when it is not provided. |
|
Object |
Placeholder for metadata about the exception item. |
No |
|
String |
The host isolation exception name. |
Yes |
|
String |
Must be set to |
Yes |
|
os_type[] |
Array of os_type values. |
Yes |
|
String[] |
An array of strings containing words and phrases to help categorize exception items. Tags can also be used to define the host isolation exception as either globally applicable to all policies or assigned to one or more policies (per policy). See Scope assignment for more details. |
No |
|
String |
Must be set to |
Yes |
Example requestedit
POST api/exception_lists/items { "description": "some description about this entry", "entries": [ { "field": "destination.ip", "value": "10.10.0.1", "type": "match", "operator": "included" } ], "list_id": "endpoint_host_isolation_exceptions", "name": "Some name for this item", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "tags": [ "policy:all" ], "type": "simple" }
Response codeedit
-
200
- Indicates a successful call.
Response payloadedit
{ "_version": "WzIxNDcsMV0=", "created_at": "2022-03-03T14:04:00.496Z", "created_by": "elastic", "description": "some description about this entry", "entries": [ { "field": "destination.ip", "value": "10.10.0.1", "type": "match", "operator": "included" } ], "id": "c6883700-9afa-11ec-94b1-fd7e90cc2a08", "item_id": "1342081d-66ad-4b03-b554-131195ce404b", "list_id": "endpoint_host_isolation_exceptions", "name": "Host Isolation Exception - Created with API", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "tags": [ "policy:all" ], "tie_breaker_id": "b65843e1-07b8-46d2-9e2b-5f0586dc364a", "type": "simple", "updated_at": "2022-03-03T14:04:00.498Z", "updated_by": "elastic" }
Update host isolation exceptionedit
PUT <kibana host>:<port>/api/exception_lists/items
Request bodyedit
A JSON object containing the fields listed below. The request must have the following:
-
The
list_id
value must beendpoint_host_isolation_exceptions
. -
The
namespace_type
value must beagnostic
. -
The
type
value must besimple
. -
os_types
must be an array with allos_types
values
Name | Type | Description | Required |
---|---|---|---|
|
comment[] |
Array of |
No, defaults to empty array. |
|
String |
Describes the host isolation exception. |
Yes |
|
entry[] |
Array containing the host isolation exception query conditions. See |
Yes. |
|
String |
The item’s unique identifier. |
Yes, when the item’s |
|
String |
The |
Yes, when the item’s |
|
Object |
Placeholder for metadata about the exception item. |
No |
|
String |
The host isolation exception name. |
Yes |
|
String |
Must be set to |
Yes |
|
os_type[] |
Array of os_type values. |
Yes |
|
String[] |
An array of strings containing words and phrases to help categorize exception items. Tags can also be used to define the host isolation exception as either globally applicable to all policies or assigned to one or more policies (per policy). See Scope assignment for more details. |
No |
|
String |
Must be |
Yes |
|
String |
The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version. |
No |
Example requestedit
Updates the entries
:
PUT api/exception_lists/items { "description": "via API", "entries": [ { "field": "destination.ip", "type": "match", "value": "10.10.0.15", "operator": "included" } ], "id": "c6883700-9afa-11ec-94b1-fd7e90cc2a08", "item_id": "1342081d-66ad-4b03-b554-131195ce404b", "name": "Host Isolation Exception - Created with API", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "type": "simple" }
Response codeedit
-
200
- Indicates a successful call.
Response payloadedit
{ "_version": "WzIyMDIsMV0=", "created_at": "2022-03-03T14:04:00.496Z", "created_by": "elastic", "description": "via API", "entries": [ { "field": "destination.ip", "type": "match", "value": "10.10.0.15", "operator": "included" } ], "id": "c6883700-9afa-11ec-94b1-fd7e90cc2a08", "item_id": "1342081d-66ad-4b03-b554-131195ce404b", "list_id": "endpoint_host_isolation_exceptions", "name": "HIE via API", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "tags": [], "tie_breaker_id": "b65843e1-07b8-46d2-9e2b-5f0586dc364a", "type": "simple", "updated_at": "2022-03-03T14:22:08.345Z", "updated_by": "elastic" }
Delete host isolation exceptionedit
DELETE <kibana host>:<port>/api/exception_lists/items
URL query parametersedit
The URL query must include one of the following:
-
id
- theid
of the item, or -
item_id
- theitem_id
of the item
In addition to the above, namespace_type
URL query parameter is also required with a value of agnostic
.
Example requestedit
Deletes the host isolation exception with item_id
of 1342081d-66ad-4b03-b554-131195ce404b
:
DELETE api/exception_lists/items?item_id=1342081d-66ad-4b03-b554-131195ce404b&namespace_type=agnostic
Response codeedit
-
200
- Indicates a successful call.
Response payloadedit
The item that was deleted:
{ "_version": "WzIyNDksMV0=", "comments": [], "created_at": "2022-03-04T12:42:41.797Z", "created_by": "elastic", "description": "some description about this entry", "entries": [ { "field": "destination.ip", "value": "10.10.0.1", "type": "match", "operator": "included" } ], "id": "c6883700-9afa-11ec-94b1-fd7e90cc2a08", "item_id": "1342081d-66ad-4b03-b554-131195ce404b", "list_id": "endpoint_host_isolation_exceptions", "name": "Host Isolation Exception via API", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "tags": [ "policy:all" ], "tie_breaker_id": "c0401075-7bd5-47e2-bd6c-4f7e088aa348", "type": "simple", "updated_at": "2022-03-04T12:42:41.802Z", "updated_by": "elastic" }
Retrieve single host isolation exceptionedit
GET <kibana host>:<port>/api/exception_lists/items
URL query parametersedit
The URL query must include one of the following:
-
id
- theid
of the item, or -
item_id
- theitem_id
of the item
In addition to the above, namespace_type
URL query parameter is also required with a value of agnostic
.
Example requestedit
GET api/exception_lists/items?item_id=1342081d-66ad-4b03-b554-131195ce404b&namespace_type=agnostic
Response codeedit
-
200
- Indicates a successful call.
Response payloadedit
{ "_version": "WzEzNjcsMV0=", "created_at": "2022-03-01T16:24:39.471Z", "created_by": "elastic", "description": "Host Isolation Exception item via API", "entries": [ { "field": "destination.ip", "type": "match", "value": "10.10.0.15", "operator": "included" } ], "id": "c6883700-9afa-11ec-94b1-fd7e90cc2a08", "item_id": "1342081d-66ad-4b03-b554-131195ce404b", "list_id": "endpoint_host_isolation_exceptions", "name": "Host Isolation Exception via API", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "tags": [ "policy:all" ], "tie_breaker_id": "97fe9d23-c8b8-4dc1-97e1-16444c8d863a", "type": "simple", "updated_at": "2022-03-01T17:21:07.273Z", "updated_by": "elastic" }
Find host isolation exceptionsedit
GET <kibana host>:<port>/api/exception_lists/items/_find
URL query parametersedit
Name | Type | Description | Required |
---|---|---|---|
|
String |
Must be set to |
Yes |
|
String |
Must be set to |
Yes |
|
Integer |
The page number to return. |
No |
|
Integer |
The number of items to return per page. |
No |
|
String |
Determines which field is used to sort the results. |
No |
|
String |
Determines the sort order, which can be |
No |
|
String |
A Kibana Query Language (KQL) string to filter the results down. |
No |
Example requestedit
GET api/exception_lists/items/_find?page=1&per_page=10&sort_field=name&sort_order=asc&list_id=endpoint_host_isolation_exceptions&namespace_type=agnostic
Response codeedit
-
200
- Indicates a successful call.
Response payloadedit
{ "data": [ { "_version": "WzEzNjcsMV0=", "created_at": "2022-03-01T16:24:39.471Z", "created_by": "elastic", "description": "Host Isolation Exception item via API", "entries": [ { "field": "destination.ip", "type": "match", "value": "10.10.0.15", "operator": "included" } ], "id": "4e0e4e10-9af8-11ec-94b1-fd7e90cc2a08", "item_id": "6555a6ed-b31c-4c74-b1a1-f2c5d9fb7d4a", "list_id": "endpoint_host_isolation_exceptions", "name": "Host Isolation Exception via API", "namespace_type": "agnostic", "os_types": [ "linux", "macos", "windows" ], "tags": [ "policy:all" ], "tie_breaker_id": "97fe9d23-c8b8-4dc1-97e1-16444c8d863a", "type": "simple", "updated_at": "2022-03-01T17:21:07.273Z", "updated_by": "elastic" } ], "page": 1, "per_page": 10, "total": 1 }
Value typesedit
The following describes the types that can be defined when using the create or update host isolation exceptions APIs:
comment
object schemaedit
Comments are JSON objects containing the following structure:
{ "comment": "some comment here" }
When used with the update API, existing comments can be updated by using their associated id
, while any comment without the id
attribute will be added as a new comment:
{ "comment": "some comment here - updated", "id": "1078cf59-5893-4143-acf7-40a40af16bee" }
os_types
valuesedit
The following are the valid OS types that can be used when creating host isolation exceptions:
-
windows
-
linux
-
macos
Scope assignmentedit
Host isolation exceptions can be assigned globally across all endpoint policies, or assigned to specific policies. You can assign the host isolation exception by defining one or more tags with a prefix of policy:
. Note that the host isolation exception can be either global or per policy, but not both. The following tags are available for use in order to control the assignment scope:
-
policy:all
: Host isolation exception is global to all policies. If used, no otherpolicy:
tag is allowed. -
policy:<endpoint-policy-id>
: Host isolation exception is assigned to a policy. Multipleper policy
tags can be used to associate the host isolation exception to multiple policies.
entry
object schemaedit
Host isolation exceptions allow for at most 1 condition to be defined. The following entry is supported by host isolation exceptions:
Destination IPsedit
Destination IPs are supported by all OS types. A destination IP entry has the following structure:
{ "field": "destination.ip", "value": "192.168.1.1", "type": "match", "operator": "included" }
-
field
:destination.ip
. -
value
: A valid IPv4 address with optional CIDR associated with thefield
. -
type
: Must bematch
. -
operator
: Must beincluded
.