Update group's privileges in a cluster
Updates group's ({gid}) privileges in a cluster ({id}).
This operation requires cluster_set_privileges privilege
or oz_clusters_set_privileges admin privilege.
The grant field specifies a list of privileges to be granted. The revoke
field specifies a list of privileges to be revoked. At least one of those
fields must be given.
Example cURL requests
Update group's privileges in a cluster
curl -u username:password -H "Content-type: application/json" \
-d '{"grant": ["cluster_view", "cluster_update"], "revoke": ["cluster_delete"]}' \
https://$ZONE_HOST/api/v3/onezone/clusters/$CLUSTER_ID/groups/$GROUP_ID/privileges
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Cluster Id. |
| gid required | string Group Id. |
Request body
Cluster privileges update request.
A list of privileges in the cluster.
A list of privileges in the cluster.
Request Examples
{
"grant": [
"cluster_view",
"cluster_view_privileges",
"cluster_add_user",
"cluster_add_group"
],
"revoke": [
"cluster_update",
"cluster_delete",
"cluster_set_privileges",
"cluster_remove_user",
"cluster_remove_group"
]
}Responses
The privileges have been updated.
Invalid request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}