---
title: "Cancel Migration"
method: DELETE
path: "/api/v1/migrations/{migration_id}"
tags: ["migrations"]
---

# Cancel Migration

`DELETE /api/v1/migrations/{migration_id}`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/migrations/{migration_id}`
- Auth: none declared

Cancel a running migration, or delete a finished one.

While a migration is in progress the worker observes the cancelled
status between orchestration steps and aborts, cleaning up Velero from
both clusters. Once it has completed, failed or been cancelled, the
record (with its run history) is removed; the migrated resources on the
target cluster are left in place.

## Path parameters

- `migration_id` string, uuid, required

## Response `200`

Successful Response

- MigrationResponse
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `organization_id` string, uuid, nullable
  - `source_cluster_id` string, uuid, required
  - `target_cluster_id` string, uuid, required
  - `namespace` string, required
  - `target_namespace` string, nullable
  - `import_workloads` boolean, required
  - `status` 'pending' | 'installing_velero_source' | 'backing_up' | 'installing_velero_target' | 'restoring' | 'importing_workloads' | 'cleaning_up' | 'completed' | 'failed' | 'cancelled', required
  - `progress_message` string, nullable
  - `backup_name` string, nullable
  - `restore_name` string, nullable
  - `backup_size_bytes` integer, nullable
  - `pvc_count` integer, nullable
  - `resource_count` integer, nullable
  - `error_message` string, nullable
  - `resync_interval_minutes` integer, nullable
  - `started_at` string, date-time, nullable
  - `completed_at` string, date-time, nullable
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
