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://$ZONE_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
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://$ZONE_HOST/api/onezone/v3/groups/{id}/children/{cid} is returned in the response Location header.
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."
}
}