Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Cancel specific transfer

DELETE /transfers/{tid}

Cancels a scheduled or active transfer. Returns 400 in case the transfer is already completed, canceled or failed.

This operation requires space_cancel_replication privilege in case of canceling replication, space_cancel_eviction privilege in case of canceling eviction and both of them when canceling migration.

However, canceling your own transfers does not require any privileges.

Example cURL requests

Cancel specific transfer

curl -X DELETE -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/transfers/$TRANSFER_ID"

Path parameters

Parameter Type & Description
tid required
string

Transfer Id.

Request Examples

Shell
oneprovider-rest-cli cancelTransfer tid=$TRANSFER_ID

Responses

application/json
204

The transfer has been canceled.

400

Invalid request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
403

Forbidden request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
404

Transfer with provided Id was not found.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
500

Internal server error.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}