Update child's group privileges
Updates child group's ({cid}) privileges in a group ({id}).
This operation requires group_set_privileges privilege.
For administrator who does not belong to this group
oz_groups_set_privileges privilege is required.
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 child group's privileges in a group
curl -u username:password -H "Content-type: application/json" -X PATCH \
-d '{"grant": ["group_view", "group_update"], "revoke": ["group_delete"]}' \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/children/$CHILD_GROUP_ID/privileges
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
| cid required | string Child group Id. |
Request body
Group privileges update request.
| Property | Type & Description |
|---|---|
grant array of strings A list of privileges in the group. | |
revoke array of strings A list of privileges in the group. | |
Request Examples
{
"grant": [
"group_view",
"group_update",
"group_delete",
"group_view_privileges",
"group_set_privileges"
],
"revoke": [
"group_add_parent",
"group_leave_parent",
"group_add_child",
"group_remove_child"
]
}Responses
The privileges have been updated.
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."
}
}