Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Add storage

POST /provider/storages

Adds additional storage resources to the provider.

Example cURL requests

Add storage

curl -H "X-Auth-Token: $TOKEN" -X POST https://$HOST/api/v3/onepanel/provider/storages \
-H "Content-Type: application/json" -d '{
    "My S3 Storage": {
        "type": "s3",
        "hostname": "iam.example.com",
        "bucketName": "bucket1.iam.example.com",
        "skipStorageDetection": true
    }
}'

Request body

application/json

The configuration details of storage resources to be added to the provider deployment. Must be an object with unique names for the storages as keys and their corresponding configuration (objects) as values - see the request body example.

Property
Type & Description
<key>
object

The storage configuration.

type
discriminator string

The type of storage.

type = "posix"

Any POSIX compatible storage, typically attached over high-throughput local network, such as NFS.

Type of the storage. Must be given explicitly and must match the actual type of subject storage - this redundancy is needed due to limitations of OpenAPI polymorphism.

Type of the storage. Must be given explicitly and must match the actual type of subject storage - this redundancy is needed due to limitations of OpenAPI polymorphism.

The type of storage.

type = "localceph"

Local Ceph cluster that has been deployed during deployment of Oneprovider. For more information on local Ceph deployment please see here.

Type of the storage. Must be given explicitly and must match the actual type of subject storage - this redundancy is needed due to limitations of OpenAPI polymorphism.

The type of storage.

type = "glusterfs"

GlusterFS volume directly attached to the Oneprovider.

The type of storage.

type = "nulldevice"

POSIX compatible storage which emulates behavior of /dev/null on local filesystem. Allows running various performance tests, which are not impacted by actual storage latency. Skip storage detection option is obligatory for this type of storage.

Type of the storage. Must be given explicitly and must match the actual type of subject storage - this redundancy is needed due to limitations of OpenAPI polymorphism.

Type of the storage. Must be given explicitly and must match the actual type of subject storage - this redundancy is needed due to limitations of OpenAPI polymorphism.

Type of the storage. Must be given explicitly and must match the actual type of subject storage - this redundancy is needed due to limitations of OpenAPI polymorphism.

timeout
integer

Storage operation timeout in milliseconds.

skipStorageDetection
boolean

If true, detecting whether storage is directly accessible by the Oneclient will not be performed. This option should be set to true on readonly storages.

lumaFeed
string

Type of feed for LUMA DB. Feed is a source of user/group mappings used to populate the LUMA DB. For more info please read: https://onedata.org/#/home/documentation/doc/administering_onedata/luma.html

Enum:
auto local external
lumaFeedUrl
string

URL of external feed for LUMA DB. Relevant only if lumaFeed equals external.

lumaFeedApiKey
string

API key checked by external service used as feed for LUMA DB. Relevant only if lumaFeed equals external.

qosParameters
object

Map with key-value pairs used for describing storage QoS parameters.

importedStorage
boolean

Defines whether storage contains existing data to be imported.

readonly
boolean

Defines whether the storage is readonly. If enabled, Oneprovider will block any operation that writes, modifies or deletes data on the storage. Such storage can only be used to import data into the space. Mandatory to ensure proper behaviour if the backend storage is actually configured as readonly. This option is available only for imported storages.

Request Examples

application/json
{
  "s3": {
    "type": "s3",
    "s3Hostname": "s3.example.com",
    "iamHostname": "iam.example.com",
    "bucketName": "bucket1.iam.example.com",
    "accessKey": "4efb70ad3e1fc8dd73c721b8f683b2e831503892",
    "secretKey": "fdeac26aedd3a179f9551d7007cc6a6273165782"
  },
  "swift": {
    "type": "swift",
    "authUrl": "http://keystone2.example.com",
    "tenantName": "Project1",
    "containerName": "Container1",
    "username": "user",
    "password": "p@$$w0rd"
  }
}

Responses

application/json
204

The storage resources have been successfully added to the provider deployment.

400

Invalid request.

Property
Type & 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."
  }
}
401

Unauthorized request.

403

Forbidden request.

500

Internal server error.

Property
Type & 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.