Skip to main content

DELETE /api/servers/:server/transfer

Cancels an outgoing server transfer that is currently in progress.

Path Parameters

server
string
required
The UUID of the server whose transfer should be cancelled

Response

Returns 202 Accepted when the cancellation request is successfully processed.

Error Responses

409 Conflict
error
Server is not currently being transferred
{
  "error": "Server is not currently being transferred."
}

Example Request

cURL
curl -X DELETE https://wings.example.com/api/servers/12345678-1234-1234-1234-123456789012/transfer \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch(
  'https://wings.example.com/api/servers/12345678-1234-1234-1234-123456789012/transfer',
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN'
    }
  }
);
Python
import requests

response = requests.delete(
    'https://wings.example.com/api/servers/12345678-1234-1234-1234-123456789012/transfer',
    headers={'Authorization': 'Bearer YOUR_TOKEN'}
)

Example Response

HTTP/1.1 202 Accepted

DELETE /api/transfers/:server

Cancels an incoming server transfer that is currently in progress on the destination node.
This endpoint is for cancelling incoming transfers, while the above endpoint cancels outgoing transfers. Use the appropriate endpoint based on whether you’re cancelling from the source or destination node.

Path Parameters

server
string
required
The UUID of the server whose incoming transfer should be cancelled

Response

Returns 202 Accepted when the cancellation request is successfully processed.

Error Responses

409 Conflict
error
Server is not currently being transferred
{
  "error": "Server is not currently being transferred."
}

Example Request

cURL
curl -X DELETE https://destination.example.com/api/transfers/12345678-1234-1234-1234-123456789012 \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch(
  'https://destination.example.com/api/transfers/12345678-1234-1234-1234-123456789012',
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN'
    }
  }
);
Python
import requests

response = requests.delete(
    'https://destination.example.com/api/transfers/12345678-1234-1234-1234-123456789012',
    headers={'Authorization': 'Bearer YOUR_TOKEN'}
)

Example Response

HTTP/1.1 202 Accepted

Cancellation Behavior

When you cancel a transfer:
1

Status Update

The transfer status is updated to cancelling
2

Context Cancellation

The transfer’s context is cancelled, stopping all ongoing operations
3

Cleanup

Resources are cleaned up and the transfer is removed from the active transfers list
4

Server Unlock

The server’s transferring flag is reset, allowing normal operations to resume
Cancelling a transfer mid-stream may leave partial data on the destination node. The destination node should clean up any incomplete transfer data.

Transfer Status Flow

Transfers go through these status states:
  • pending: Transfer created but not yet started
  • processing: Archive is being created and/or streamed
  • cancelling: Cancellation requested, cleanup in progress
  • cancelled: Transfer successfully cancelled
  • failed: Transfer failed due to an error
  • completed: Transfer finished successfully

Status Checks

You cannot cancel a transfer that is:
  • Already in the cancelling state
  • Already cancelled
  • Already completed
  • Already failed
Attempting to cancel in these states will result in a 409 Conflict error.

Monitoring Cancellation

You can monitor the cancellation through the server’s WebSocket connection:
{
  "event": "transfer.status",
  "args": ["cancelling"]
}
When cancellation completes:
{
  "event": "transfer.status",
  "args": ["cancelled"]
}
And a final log message:
{
  "event": "transfer.logs",
  "args": ["[yellow][bold]Mar 04 2026 22:30:15 [Transfer System] [Source Node]:[default] Canceled."]
}

Use Cases

User Cancellation

User decides they no longer want to transfer the server

Error Recovery

Transfer is taking too long or encountering issues

Node Maintenance

Source or destination node needs to go offline

Resource Management

Free up bandwidth or resources for other operations

Initiate Transfer

Start an outgoing server transfer

Receive Transfer

Accept an incoming server transfer

Build docs developers (and LLMs) love