Get temporary token generation of a user
Returns the generation of temporary tokens of a specific user. 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 currently authorized user and provider
that supports the user, otherwise requires oz_tokens_manage admin privilege.
Example cURL requests
Get temporary token generation of a user
curl -H "x-auth-token: $TOKEN" -X GET \
https://$HOST/api/v3/onezone/users/$USER_ID/tokens/temporary
{
"generation": 3
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string User Id |
Request Examples
onezone-rest-cli getTemporaryTokenGenerationOfUser id=c26bab23d12f7389c3c311caf9c15902Responses
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."
}
}