Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get manual storage import example.

GET /provider/spaces/{id}/storage-import/manual/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:
  • 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

Shell
onepanel-rest-cli -u onepanel:$PASSPHRASE --host https://$HOST:9443 getManualStorageImportExample id=$SPACE_ID

Responses

application/json
200

Example curl command.

PropertyType & Description
curl
string

Example

application/json
{
  "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"
}
401

Unauthorized request.

403

Forbidden request.

500

Internal server error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
503

Services needed to fulfill this request are not running.