Get temporary token generation of a provider
Returns the generation of temporary tokens of a specific provider. The generation is an increasing number that denotes the generation of shared token secret - if the secret changes (temporary tokens are revoked), the generation is incremented.
This operation is available for the subject provider (id), or the provider's
cluster member. Otherwise requires oz_tokens_manage admin privilege.
Example cURL requests
Get temporary token generation of a provider
curl -H "x-auth-token: $TOKEN" -X GET \
https://$HOST/api/v3/onezone/providers/$PROVIDER_ID/tokens/temporary
{
"generation": 3
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string User Id |
Request Examples
onezone-rest-cli getTemporaryTokenGenerationOfProvider id=6ebe7ac282e0188b5336b5d8cfa564d5Responses
Returns the current temporary token generation.
| Property | Type & Description |
|---|---|
generation integer Current temporary token generation | |
Example
{
"generation": 3
}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."
}
}