List named tokens of a user
Returns the list of specific user's named tokens.
This operation is available for the currently authorized user,
otherwise requires oz_tokens_manage admin privilege.
You can learn more about named and temporary tokens here.
Example cURL requests
List named tokens of a user
curl -u username:password -X GET \
https://$HOST/api/v3/onezone/users/$USER_ID/tokens/named
{
"tokens": [
"2b5d0dd5aa6443a69277b5ce0544fec2",
"818bf8d4404c2bcee2b47f024f6c0890",
"4a5e5dabcd55e03f1e9237eeca2548ff",
"81336b59656653a481d1e65168f3f213"
]
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string User Id |
Request Examples
onezone-rest-cli listNamedTokensOfUser id=c26bab23d12f7389c3c311caf9c15902Responses
The list of all user named tokens
| Property | Type & Description |
|---|---|
tokens array of strings List of token ids. | |
Example
{
"tokens": [
"2b5d0dd5aa6443a69277b5ce0544fec2",
"818bf8d4404c2bcee2b47f024f6c0890",
"4a5e5dabcd55e03f1e9237eeca2548ff",
"81336b59656653a481d1e65168f3f213"
]
}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."
}
}