Add child group
Adds group {cid} as child group of group {id}. Optional privileges can be passed in the request body, otherwise default privileges will be set for the child group in this group.
This operation requires group_add_child privilege in the parent group and
group_add_parent privilege in the child group. If privileges are
specified in the request, group_set_privileges privilege is also required.
For administrator who does not belong to those groups,
oz_groups_add_relationships privilege is required, and
oz_groups_set_privileges if privileges are specified in the request.
Example cURL requests
Add child group
curl -u username:password -X PUT \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/children/$CHILD_GROUP_ID
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
| cid required | string Child group Id. |
Request body
| Property | Type & Description |
|---|---|
privileges array of strings A list of privileges in the group. | |
Request Examples
onezone-rest-cli addChildGroup id=538ef9643ae6b9e40817e51eece7e341 cid=0ec9817801d74e2fa6cc50a476ed5d4dResponses
URI of the added group in form https://$HOST/api/onezone/v3/groups/{id}/children/{cid} is returned in the response Location header.
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."
}
}