---
type: api
title: Enable Attack Discovery schedule
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v9/operation/operation-enableattackdiscoveryschedules
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v9/operation/operation-enableattackdiscoveryschedules
products:
  - Kibana
---

# Enable Attack Discovery schedule

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

## Paths

- `POST` `/api/attack_discovery/schedules/{id}/_enable`
- `POST` `/s/{space_id}/api/attack_discovery/schedules/{id}/_enable`

#### Path parameters

- `id` (string · format: nonempty · min length: 1) — required
  The unique identifier (UUID) of the Attack Discovery schedule to enable. This ID is returned when creating a schedule and can be found in schedule listings.
  Example: `12345678-1234-1234-1234-123456789012`

## Description

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

Enables a previously disabled Attack Discovery schedule, allowing it to run according to its configured interval. Once enabled, the schedule will begin executing at the next scheduled time based on its interval configuration.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Responses

#### `200`

Successfully enabled Attack Discovery schedule, returning the schedule ID for confirmation

`application/json`

- `id` (string · format: nonempty · min length: 1)
  A string that does not contain only whitespace characters.
#### `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

#### curl

```curl
curl \
 --request POST 'http://localhost:5601/api/attack_discovery/schedules/12345678-1234-1234-1234-123456789012/_enable' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json"
```

## Response examples

#### Confirmation returned after enabling an Attack Discovery schedule.

```json
{
  "id": "12345678-1234-1234-1234-123456789012"
}
```

#### Bad Request error returned when the enable schedule request is invalid.

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

