---
title: "Clean up detection alert migrations"
method: DELETE
path: "/api/detection_engine/signals/migration"
tags: ["Security Detections API"]
deprecated: true
---

# Clean up detection alert migrations

`DELETE /api/detection_engine/signals/migration`

> **Deprecated.**

**Spaces method and path for this operation:**

<div><span class="operation-verb delete">delete</span>&nbsp;<span class="operation-path">/s/{space_id}/api/detection_engine/signals/migration</span></div>

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

**DEPRECATED.** Cleanup API for old migration artifacts. Do not add new call sites.
**WARNING:** This schedules deletions; ensure no production reads still point at the source index.

Migrations favor data integrity over shard size. Consequently, unused or orphaned indices are artifacts of
the migration process. A successful migration can leave both the old and new indices present, so the old
index may be deleted. While you can delete these indices manually, the endpoint applies a deletion policy
to the relevant index, causing it to be deleted after 30 days, and removes other migration-specific artifacts.

## Request body

- object
  - `migration_ids` string[], required — Array of `migration_id`s to cleanup.

## Response `200`

Successful response

- SecurityDetectionsAPIMigrationCleanupResult[]
  - `destinationIndex` string, required
  - `error` object
    - `message` string, required
    - `status_code` integer, required
  - `id` string, required
  - `sourceIndex` string, required
  - `status` 'success' | 'failure' | 'pending', required
  - `updated` string, date-time, required
  - `version` string, required

## Other responses

- `400` — Invalid input data response
- `401` — Unsuccessful authentication response
- `500` — Internal server error response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
