Register provider
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 -u username:password -H "Content-type: application/json" \
-X POST -d '{
"token" : "MDAxNmxvY2F00aW9uIHJlZ2lzdHJ5CjAwM2JpZGVudGlmaW",
"name" : "My provider",
"subdomainDelegation" : "false",
"domain" : "my-provider.example.com",
"latitude" : "50.0647",
"longitude" : "19.9450",
}' \
https://$HOST/api/v3/onezone/provider
Request body
Provider reqistration request.
Token for registering a new Oneprovider.
Oneprovider name.
If enabled, the Oneprovider will be assigned a subdomain in onezone's domain and 'subdomain' property must be provided. If disabled, 'domain' property should be provided.
Unique subdomain in onezone's domain for the Oneprovider. Required if subdomain delegation is enabled.
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.
The geographical latitude of the Oneprovider's data center location.
The geographical longitude of the Oneprovider's data center location.
Request Examples
{
"token": "MDAxNmxvY2F00aW9uIHJlZ2lzdHJ5CjAwM2JpZGVudGlmaW",
"name": "Example provider",
"subdomainDelegation": false,
"domain": "provider2.example.com",
"latitude": 50.0647,
"longitude": 19.945
}Responses
Provider registered successfully.
The Id of the newly registered provider.
The Oneprovider root token - bearing its identity and full authorization.
The Id of the Onezone user that is linked to the Oneprovider panel admin account.
Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}