List user's cluster privileges
Returns the list of user's ({uid}) privileges in a cluster ({id}).
This operation requires cluster_view_privileges privilege.
For administrators who do not have to be members of this cluster,
oz_clusters_view_privileges privilege is required.
Example cURL requests
List user's privileges in a cluster
curl -u username:password -X GET \
https://$HOST/api/v3/onezone/clusters/$CLUSTER_ID/users/$USER_ID/privileges
{
"privileges": [
"cluster_view",
"cluster_update",
"cluster_delete",
"cluster_view_privileges",
"cluster_set_privileges"
]
}
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Cluster Id. |
| uid required | string User Id. |
Request Examples
onezone-rest-cli listUserClusterPrivileges id=b752ceafabb662b4e5728b2ded25cdd1 uid=a5b469a2b0516b662a49da74d6d7d7bcResponses
The list of user's privileges in the cluster.
| Property | Type & Description |
|---|---|
privileges array of strings A list of privileges in the cluster. | |
Example
{
"privileges": [
"cluster_view",
"cluster_update",
"cluster_delete",
"cluster_view_privileges",
"cluster_set_privileges"
]
}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."
}
}