Get manual storage import example.
Returns example curl command that can be executed to manually import (register) file from storage.
The command is filled with correct host of the Oneprovider, space and storage ids. In order to execute the command, user must set 3 variables:
TOKEN- Onedata access token.STORAGE_FILE_ID- Identifier of the file on storage, relevant for given storage backend:- path on POSIX-compatible or canonical object storages, e.g. /dir/file.txt,
- URL on HTTP based storages, e.g. https://www.example.org/data/21/run123.tar.
DESTINATION_PATH- An absolute path in space where file should be created.
For more info please read: https://onedata.org/#/home/api/stable/oneprovider?anchor=tag/File-registration
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string The Id of a space for which the example command should be generated. |
Request Examples
onepanel-rest-cli -u onepanel:$PASSPHRASE --host https://$HOST:9443 getManualStorageImportExample id=$SPACE_ID
Responses
Example curl command.
| Property | Type & Description |
|---|---|
curl string | |
Example
{
"curl": "curl -X POST -H \"X-Auth-Token:$TOKEN\" -H \"content-type:application/json\" \\ -d '{\"storageId\":\"'$STORAGE_ID'\", \"spaceId\":\"'$SPACE_ID'\", \"storageFileId\":\"'$STORAGE_FILE_ID'\", \"destinationPath\":\"'$DESTINATION_PATH'\"}' $ONEPROVIDER_HOST/api/v3/oneprovider/data/register"
}Unauthorized request.
Forbidden request.
Internal server error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Services needed to fulfill this request are not running.