Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Register provider

POST /providers

Registers a Oneprovider in Onezone service. Upon success, a new cluster is created, with the registering user linked to it. The cluster Id is the same as Oneprovider Id.

Requires a valid provider registration token - see:

This operation has public access.

Example cURL requests

Register provider

curl -H "Content-type: application/json" -X POST -d '{
  "token" : "MDAxNmxvY2F00aW9uIHJlZ2lzdHJ5CjAwM2JpZGVudGlmaW...",
  "name" : "My provider",
  "adminEmail" : "person@example.com",
  "subdomainDelegation" : "false",
  "domain" : "my-provider.example.com",
  "latitude" : "50.0647",
  "longitude" : "19.9450",
}' \
https://$ZONE_HOST/api/v3/onezone/providers

Request body

application/json

Provider reqistration request.

PropertyType & Description
token
string

Token for registering a new Oneprovider. If Onezone allows regular users to freely register Oneproviders, it can be obtained from GUI or REST API. Otherwise, only a Onezone admin can issue such token.

name
string

Oneprovider name.

adminEmail
string

Contact email address of the Oneprovider admin.

subdomainDelegation
boolean

When enabled, Oneprovider will be assigned a subdomain within Onezone's domain. In this case, the following properties must also be specified:

  • subdomain
  • opWorkerIpAddresses (successor of the deprecated ipList)

If the OneS3 service is deployed, the oneS3IpAddresses and oneS3Port properties are additionally required.

If this option is disabled, the domain property must be provided instead.

subdomain
string

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

ipList
array of strings

The list of Oneprovider Worker IP addresses advertised by Onezone on behalf of the Oneprovider. Deprecated in favor of opWorkerIpAddresses. Either this or opWorkerIpAddresses is required if subdomain delegation is enabled.

opWorkerIpAddresses
array of strings

The list of Oneprovider Worker IP addresses advertised by Onezone on behalf of the Oneprovider. Successor of the deprecated ipList. Either this or ipList is required if subdomain delegation is enabled.

opWorkerPort
integer

The port number of Oneprovider Worker advertised by Onezone on behalf of the Oneprovider.

oneS3IpAddresses
array of strings

The list of Oneprovider OneS3 IP addresses advertised by Onezone on behalf of the Oneprovider. Must be provided alongside oneS3Port if subdomain delegation is enabled and OneS3 deployed.

oneS3Port
integer

The port number of Oneprovider OneS3 advertised by Onezone on behalf of the Oneprovider.

domain
string

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

latitude
number

The geographical latitude of the Oneprovider's data center location.

longitude
number

The geographical longitude of the Oneprovider's data center location.

Request Examples

application/json
{
  "token": "MDAxNmxvY2F00aW9uIHJlZ2lzdHJ5CjAwM2JpZGVudGlmaW...",
  "name": "My provider",
  "adminEmail": "person@example.com",
  "subdomainDelegation": false,
  "domain": "my-provider.example.com",
  "latitude": 50.0647,
  "longitude": 19.945
}

Responses

application/json
200

Provider registered successfully.

PropertyType & Description
providerId
string

The Id of the newly registered provider.

providerRootToken
string

The Oneprovider root token - bearing its identity and full authorization.

adminUserId
string

The Id of the Onezone user that is linked to the Oneprovider panel admin account.

400

Invalid request.

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

Authentication 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."
  }
}
403

Authorization 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."
  }
}
404

Resource not found.

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."
  }
}
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."
  }
}