---
type: api
title: Isolate an endpoint
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-endpointisolateaction
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-endpointisolateaction
products:
  - Kibana
---

# Isolate an endpoint

Authentication: required

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/endpoint/action/isolate`
- `POST` `/s/{space_id}/api/endpoint/action/isolate`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

Isolate an endpoint from the network. The endpoint remains isolated until it's released.

## Request body

`application/json`

- `agent_type` (enum) — optional
  List of agent types to retrieve. Defaults to `endpoint`.
  Values: `endpoint`, `sentinel_one`, `crowdstrike`, `microsoft_defender_endpoint`
- `alert_ids` (string[] · format: nonempty · min items: 1) — optional
  A list of alerts ids.
- `case_ids` (string[] · min items: 1) — optional
  Case IDs to be updated (cannot contain empty strings)
- `comment` (string) — optional
  Optional comment
- `endpoint_ids` (string[] · min items: 1) — required
  List of endpoint IDs (cannot contain empty strings)
- `parameters` (object) — optional
  Optional parameters object

## Response

OK

`application/json`

Type: `object`

## Code examples

#### Console

```console
POST kbn:/api/endpoint/action/isolate
{
  "comment": "Locked down, pending further investigation",
  "endpoint_ids": [
    "9972d10e-4b9e-41aa-a534-a85e2a28ea42",
    "bc0e4f0c-3bca-4633-9fee-156c0b505d16",
    "fa89271b-b9d4-43f2-a684-307cffddeb5a"
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/endpoint/action/isolate" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "comment": "Locked down, pending further investigation",
    "endpoint_ids": [
      "9972d10e-4b9e-41aa-a534-a85e2a28ea42",
      "bc0e4f0c-3bca-4633-9fee-156c0b505d16",
      "fa89271b-b9d4-43f2-a684-307cffddeb5a"
    ]
  }'
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "action": "233db9ea-6733-4849-9226-5a7039c7161d",
  "data": {
    "agents": [
      "ed518850-681a-4d60-bb98-e22640cae2a8"
    ],
    "agentType": "endpoint",
    "command": "suspend-process",
    "comment": "suspend the process",
    "completedAt": "2022-07-29T19:09:44.961Z",
    "createdBy": "myuser",
    "errors": [],
    "id": "233db9ea-6733-4849-9226-5a7039c7161d",
    "isCompleted": true,
    "isExpired": false,
    "outputs": {
      "ed518850-681a-4d60-bb98-e22640cae2a8": {
        "content": {
          "key": "value"
        },
        "type": "json"
      }
    },
    "parameters": {
      "entity_id": "abc123"
    },
    "startedAt": "2022-07-29T19:08:49.126Z",
    "wasSuccessful": true
  }
}
```

