---
type: api
title: Set attack discovery alerts workflow status
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-setattacksstatus
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-setattacksstatus
products:
  - Kibana
---

# Set attack discovery alerts workflow status

Availability: 9.5+

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

## Paths

- `POST` `/api/detection_engine/attacks/status`
- `POST` `/s/{space_id}/api/detection_engine/attacks/status`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Set the workflow status of one or more attack discovery alerts by IDs, optionally cascading the status to their related detection alerts.

## Request Body

`application/json`

An object containing the desired status and explicit attack ids

One of:
- **CloseAttacksByIds** (`status: closed`)
  - `ids` ([] object · min: 1) — required
    A list of alerts `id`s.
  - `reason` (union) — optional
    The reason for closing the alerts. Can be one of following predefined reasons: [false_positive, duplicate, true_positive, benign_positive, automated_closure, other] or a custom reason provided by the user through the advanced settings.
    Values: `false_positive`, `duplicate`, `true_positive`, `benign_positive`, `automated_closure`, `other`
  - `status` (enum) — required
    Values: `closed`
  - `update_related_alerts` (boolean · default: false) — optional
    When `true`, the change is also applied to detection alerts related to the attacks via `kibana.alert.attack_discovery.alert_ids`.
- **SetAttacksStatusByIdsBase** (`status: open | acknowledged | in-progress`)
  - `ids` ([] object · min: 1) — required
    A list of alerts `id`s.
  - `status` (enum) — required
    The status of an alert, which can be `open`, `acknowledged`, `in-progress`, or `closed`.
    Values: `open`, `acknowledged`, `in-progress`
  - `update_related_alerts` (boolean · default: false) — optional
    When `true`, the change is also applied to detection alerts related to the attacks via `kibana.alert.attack_discovery.alert_ids`.

## Responses

#### `200`

Successful response

`application/json`

Type: `object`

#### `400`

Invalid input data response

`application/json`

One of:
- **PlatformErrorResponse**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **SiemErrorResponse**
  - `message` (string)
  - `status_code` (integer)
#### `401`

Unsuccessful authentication response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `500`

Internal server error response

`application/json`

- `message` (string)
- `status_code` (integer)
## Code Examples

#### Console

```console
POST /api/detection_engine/attacks/status
{
  "ids": [
    "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"
  ],
  "status": "acknowledged"
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/detection_engine/attacks/status" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "80e1383f856e67c1b7f7a1634744fa6d66b6e2ef7aa26d226e57afb5a7b2b4a1"
  ],
  "status": "acknowledged"
}'
```

## Response Examples

#### Success

```json
{
  "batches": 1,
  "deleted": 0,
  "failures": [],
  "noops": 0,
  "requests_per_second": -1,
  "retries": {
    "bulk": 0,
    "search": 0
  },
  "throttled_millis": 0,
  "throttled_until_millis": 0,
  "timed_out": false,
  "took": 81,
  "total": 1,
  "updated": 1,
  "version_conflicts": 0
}
```

#### Bad

```json
{
  "error": "Bad Request",
  "message": "[request body].ids: at least one attack id is required to update status",
  "statusCode": 400
}
```

#### Unauthorized

```json
{
  "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
}
```

#### Server error

```json
{
  "message": "Internal Server Error",
  "status_code": 500
}
```

