Cancel a migration
POSThttps://api.port.io/v1/migrations/:migration_id/cancel
This route allows you to cancel a running migration in your Port organization.
Request
Path Parameters
migration_id stringrequired
The identifier of the migration you want to cancel.
- application/json
Body
reasonstring
The reason for cancelling the migration.
Responses
- 200
Default Response
Authorization: Authorization
name: Authorizationtype: apiKeyin: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.port.io/v1/migrations/:migration_id/cancel");
request.Headers.Add("Authorization", "<Authorization>");
var content = new StringContent("{\n \"reason\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear