---
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/4371/api/doc/kibana/v9/operation/operation-createalertsmigration
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/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`

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

## Description

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

**DEPRECATED.** Legacy API for on-demand reindexing of old `.siem-signals-*` alert indices. Do not build new
integrations; upgrade the Elastic Stack and rely on product-managed data lifecycle instead.
**WARNING:** Migrations can be resource intensive and should be planned during a maintenance window.

Initiate a migration of detection alerts. Migrations are initiated per index. The process is not destructive
and should not remove existing data, but it can consume significant cluster resources. Plan capacity accordingly.

## Request Body

`application/json`

Alerts migration parameters

- `index` ([] string · min: 1) — required
  Array of index names to migrate.
- `requests_per_second` (integer · min: 1) — optional
  The throttle for the migration task in sub-requests per second. Corresponds to requests_per_second on the Reindex API.
- `size` (integer · min: 1) — optional
  Number of alerts to migrate per batch. Corresponds to the source.size option on the Reindex API.
- `slices` (integer · min: 1) — optional
  The number of subtasks for the migration task. Corresponds to slices on the Reindex API.

## Responses

#### `200`

Successful response

`application/json`

- `indices` ([] union oneOf)
  - **AlertsIndexMigrationSuccess**
    - `index` (string)
    - `migration_id` (string)
    - `migration_index` (string)
  - **AlertsIndexMigrationError**
    - `error` (object)
      - `message` (string)
      - `status_code` (string)
    - `index` (string)
  - **SkippedAlertsIndexMigration**
    - `index` (string)
#### `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/signals/migration
{
  "index": [
    ".siem-signals-default-000001"
  ]
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/detection_engine/signals/migration" \
  -H "Content-Type: application/json" \
  -d '{
  "index": [
    ".siem-signals-default-000001"
  ]
}'
```

## Response Examples

#### Success

```json
{
  "indices": [
    {
      "index": ".siem-signals-default-000001,",
      "migration_id": "923f7c50-505f-11eb-ae0a-3fa2e626a51d",
      "migration_index": ".siem-signals-default-000001-r000016"
    }
  ]
}
```

#### Bad

```json
{
  "error": "Bad Request",
  "message": "[request body].index: at least one index name is required to start a migration",
  "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
}
```

