---
type: api
title: Initiate a detection alert migration
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-createalertsmigration
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-createalertsmigration
products:
  - Kibana
---

# Initiate a detection alert migration

deprecated

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

## Paths

- `POST` `/api/detection_engine/signals/migration`
- `POST` `/s/{space_id}/api/detection_engine/signals/migration`

## Description

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

Initiate a migration of detection alerts.
Migrations are initiated per index. While the process is neither destructive nor interferes with existing data, it may be resource-intensive. As such, it is recommended that you plan your migrations accordingly.

## 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>`

## Request body

Alerts migration parameters

`application/json`

- `index` (string[] · format: nonempty · min items: 1) — required
- `requests_per_second` (integer · min: 1) — optional
- `size` (integer · min: 1) — optional
- `slices` (integer · min: 1) — optional

## Responses

#### `200`

Successful response

`application/json`

- `indices` (union oneOf[])
  - **{ migration_id, migration_index }**
    - `index` (string)
    - `migration_id` (string)
    - `migration_index` (string)
  - **{ error }**
    - `error` (object)
      - `message` (string)
      - `status_code` (string)
    - `index` (string)
  - **SkippedAlertsIndexMigration**
    - `index` (string)
#### `400`

Invalid input data response

`application/json`

One of:
- **{ error, statusCode }**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **{ status_code }**
  - `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 kbn:/api/detection_engine/signals/migration
{
  "index": [
    "string"
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/detection_engine/signals/migration" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "index": [
      "string"
    ]
  }'
```

