Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Replicate file or directory by Id Deprecated

POST /replicas-id/{id}

This enpoint is deprecated, please use this one.

Replicates a file specified by Id in id parameter to a specified provider. This operation is asynchronous and it can take a long time depending on the size of the data to move.

If the id parameter specifies a directory, entire directory is replicated to requested provider.

This operation requires space_schedule_replication privilege.

Example cURL requests

Replicate file by Id to any provider

curl -X POST -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/replicas-id/$FILE_ID"


{ "transferId": "4f674576-4c63-443b-b3d5-2f74a40724a0" }

Replicate file by Id to specific storage provider with URL callback

curl -X POST -H "X-Auth-Token: $TOKEN" \
-H 'Content-type: application/json' -d '{ "url": "http://example.com/transfer_complete" }' \
"https://$HOST/api/v3/oneprovider/replicas-id/$FILE_ID?provider_id=$PROVIDER_ID"


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

Path parameters

Parameter Type & Description
id required
string

Id of the file.

Query parameters

Parameter Type & Description
provider_id
string

The Id of the provider to which the file will be replicated. By default the file will be replicated to the provided handling this REST call.

Request body

application/json

This parameter allows the user to specify a REST callback URL which will be called when the transfer is complete

PropertyType & Description
url
string

The URL which should be called, when requested action completed.

Request Examples

application/json
{
  "url": "http://monitoring.example.com:8080/notifications"
}

Responses

application/json
201

The replication request was 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."
}