Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Register provider

POST /provider

Registers provider in the zone.

Request body

application/json

The new provider details.

PropertyType & Description
name
string

The name under which the provider should be registered in a zone.

tokenProvisionMethod
string

Indicates how the Oneprovider registration token will be provided:

  • "inline" - the registration token must be placed in the token field (consult for more information).
  • "fromFile" - the registration token will be read from given file, specified in the tokenFile field (consult for more information).
Enum:
inlinefromFile
token
string

Registration token obtained from Onezone. This token identifies the Onezone service where the Oneprovider will be registered and authorizes the registration request. Required when the tokenProvisionMethod is set to "inline".

tokenFile
string

Absolute path to the file containing the Oneprovider registration token. The token (and nothing else) should be placed in the file as plaintext. The file does not have to pre-exist - it may be created after this request is made (Onepanel will wait for the file to appear for some time). Required when the tokenProvisionMethod is set to "fromFile".

subdomainDelegation
boolean

If enabled, the storage provider will be assigned a subdomain in onezone's domain and 'subdomain' property must be provided. If disabled, 'domain' property should be provided.

subdomain
string

Unique subdomain in onezone's domain for the storage provider. Required if subdomain delegation is enabled.

domain
string

The fully qualified domain name of the storage provider or its IP address (only for single-node deployments or clusters with a reverse proxy). Required if subdomain delegation is disabled.

geoLongitude
number

The geographical longitude of the storage provider.

geoLatitude
number

The geographical latitude of the storage provider.

adminEmail
string

Email address of the Oneprovider administrator.

Request Examples

application/json
{
  "name": "Provider1",
  "token": "MDAzM2xvY2F00aW9uIGRldi1vbmV6b25lLmRlZmF1...",
  "subdomainDelegation": false,
  "domain": "provider.example.com",
  "geoLongitude": -24.3776025,
  "geoLatitude": -128.3519364
}

Responses

application/json
204

Provider has been successfully registered.

400

Invalid request.

PropertyType & Description
error
object (ErrorDetails)

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.

409

Provider already registered.

500

Internal server error.

PropertyType & Description
error
object (ErrorDetails)

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.