Get named token status
Returns the status of a specific named token - information if the token is currently revoked.
This operation is available for:
- the token owner (subject)
- in case of user tokens - a provider that supports the user
- in case of provider tokens - the provider cluster member
- admins with
oz_tokens_manageprivilege.
Example cURL requests
Get named token status
curl -u username:password -X GET \
https://$HOST/api/v3/onezone/tokens/named/$TOKEN_ID/status
{
"revoked": false
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Token Id |
Request Examples
onezone-rest-cli getNamedTokenStatus id=$TOKEN_IDResponses
Returns the status of a specific named token.
| Property | Type & Description |
|---|---|
revoked boolean (TokenPropertyRevoked) Determines if this token is revoked (cannot be used) - can be toggled at will | |
Example
{
"revoked": false
}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."
}
}