Replicate file or directory by Id Deprecated
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
This parameter allows the user to specify a REST callback URL which will be called when the transfer is complete
| Property | Type & Description |
|---|---|
url string The URL which should be called, when requested action completed. | |
Request Examples
{
"url": "http://monitoring.example.com:8080/notifications"
}Responses
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.
| Property | Type & Description |
|---|---|
transferId string Transfer Id. | |
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Oneprovider REST API not available.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}