---
type: api
title: Bulk enable Attack Discovery schedules
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-bulkenableattackdiscoveryschedules
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-bulkenableattackdiscoveryschedules
products:
  - Kibana
---

# Bulk enable Attack Discovery schedules

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

## Paths

- `POST` `/api/attack_discovery/schedules/_bulk_enable`
- `POST` `/s/{space_id}/api/attack_discovery/schedules/_bulk_enable`

- [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.

Enables multiple Attack Discovery schedules by ID.

## Request Body

`application/json`

- `ids` ([] string · min: 1) — required
  The unique identifiers of the Attack Discovery schedules to update.

## Responses

#### `200`

Successfully processed the bulk enable request.

`application/json`

- `errors` ([] object)
  - `message` (string)
    The error message returned for the failed schedule.
  - `rule` (object)
    - `id` (string · min: 1)
      A string that does not contain only whitespace characters.
    - `name` (string)
      The name of the failed schedule.
  - `status` (number)
    Optional HTTP status associated with the failed schedule operation.
- `ids` ([] string)
  The unique identifiers of the schedules successfully affected by the bulk action.
- `total` (number)
  The total number of schedules matched by the bulk action.
#### `400`

Bad Request response.

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Human-readable error message describing what went wrong
- `status_code` (number)
  HTTP status code
## Code Examples

#### Console

```console
POST /api/attack_discovery/schedules/_bulk_enable
{
  "ids": [
    "12345678-1234-1234-1234-123456789012",
    "98765432-1234-1234-1234-123456789012"
  ]
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/attack_discovery/schedules/_bulk_enable" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "12345678-1234-1234-1234-123456789012",
    "98765432-1234-1234-1234-123456789012"
  ]
}'
```

## Response Examples

#### Bulk enable response for two successfully enabled schedules.

```json
{
  "errors": [],
  "ids": [
    "12345678-1234-1234-1234-123456789012",
    "98765432-1234-1234-1234-123456789012"
  ],
  "total": 2
}
```

#### Bad Request error returned when the bulk enable payload is invalid.

```json
{
  "error": "Bad Request",
  "message": "Invalid request parameters.",
  "status_code": 400
}
```

