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://$OP_PANEL_HOST:9443 getManualStorageImportExample id=$SPACE_ID
Responses
Example curl command.
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.
error object (ErrorDetails) Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
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.