Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get current provider's domain config

GET /provider/domain_config

Returns the domain config of the Oneprovider that performed the request.

This operation requires provider authentication - see provider auth token.

Example cURL requests

Get provider's domain config

curl -sS -u username:password -X GET  \
https://$HOST/api/v3/onezone/provider/domain_config

{
  "subdomainDelegation": true,
  "domain": "provider1.onezone.example.com",
  "subdomain": "provider1",
  "ipList": ["172.17.0.1", "172.17.0.2", "172.17.0.3"]
}

Request Examples

Shell
onezone-rest-cli getCurrentProviderDomainConfig

Responses

application/json
200

The provider's domain config.

PropertyType & Description
subdomainDelegation
boolean

True if this Oneprovider has been assigned a subdomain in Onezone's domain.

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).

subdomain
string

Unique subdomain in Onezone's domain for the Oneprovider. Applicable if subdomain delegation is enabled, null otherwise.

ipList
array of strings

The list of IP addresses advertised by Onezone on behalf of the Oneprovider. Applicable if subdomain delegation is enabled, empty list otherwise.

Example

application/json
{
  "subdomainDelegation": true,
  "domain": "provider1.onezone.example.com",
  "subdomain": "provider1",
  "ipList": [
    "172.17.0.1",
    "172.17.0.2",
    "172.17.0.3"
  ]
}
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."
  }
}