Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Evict existing replica by file path Deprecated

DELETE /replicas/{path}

This enpoint is deprecated, please use this one.

Removes a replica of a file specified by absolute path in path parameter from a specified provider. This operation is asynchronous. Optional argument migration_provider_id can be used to specify where the repliace has to be replicated before being evicted from this provider.

If the path parameter specifies a directory, entire directory is evicted from this provider requested provider.

This operation requires space_schedule_eviction privilege when scheduling eviction and also space_schedule_replication when scheduling migration.

Example cURL requests

Remove file replica by path from specific storage provider

curl -X DELETE -H "X-Auth-Token: $TOKEN" -H 'Content-type: application/json' \
"https://$HOST/api/v3/oneprovider/replicas/MySpace1/MyFile1.txt?provider_id=$PROVIDER_ID"


{ "transferId": "b3c85b99-44db-4277-8c66-2ccd50888565" }

Path parameters

Parameter Type & Description
path required
string

File path (e.g. '/MySpace/testfiles/file1.txt')

Query parameters

Parameter Type & Description
provider_id
string

The Id of the provider from which the replica will be evicted. By default the replica will be evicted in the provider handling this REST call.

migration_provider_id
string

The Id of the provider to which the file should be replicated before being evicted.

Request Examples

Shell
oneprovider-rest-cli evictReplica path='/MySpace/testfiles/file1.txt' migration_provider_id=$MIGRATION_PROVIDER_ID

Responses

application/json
201

The replica removal has been accepted and the result is the transfer Id, which can be used for monitoring the transfer status. Also URI of the new transfer in form https://$HOST/api/v3/oneprovider/transfers/{tid} is returned in the response Location header.

PropertyType & Description
transferId
string

Transfer Id.

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

Oneprovider REST API not available.

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."
}