Create provider registration token for current user Deprecated
This enpoint is deprecated and will be removed in future release, please use one of:
Creates a token for the current user allowing him to register a new provider in Onezone. After the registration, the user's account will be automatically linked to the new Oneprovider cluster (granting him access to Oneprovider's onepanel).
This operation can be invoked on behalf of the current user only.
If registration policy in Onezone is configured as open, any user can
generate the token for himself. In case of restricted policy, this
operation requires oz_providers_invite privilege.
Example cURL requests
Create provider registration token for current user
curl -u username:password -X POST \
https://$HOST/api/v3/onezone/user/clusters/$CLUSTER_ID
{
"token": [
"MDAxNmxvY2F00aW9uIHJlZ2lzdHJ5CjAwM2JpZGVudGlmaW-0Y8"
]
}
Request Examples
onezone-rest-cli createProviderRegistrationTokenForCurrentUserResponses
A provider registration token.
| Property | Type & Description |
|---|---|
token string The token for registering a new provider. | |
Example
{
"token": "JKAxNWxvY2F0aW9uIG9uZXpvbmUKMDAzYmlkZW50aWZpZXIgOEhmSEFSSGdrbHFCa1pWSTRsNk1CVHZTU3Z0OThwcHA2OTQ4czhRN1NPawowMDFhY2lkIHRpbWUgPCAxNDk2MTQwMTQ0CjAwMmZzaWduYXR1cmUg88OI1d24c36707d99197c6cd995810a43aca"
}Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}