Create a new parent group for given group
Creates a new group for the current group. The group automatically becomes a member of this group.
This operation requires group_add_parent privilege.
For administrator who does not belong to this group
oz_groups_add_relationships and oz_groups_create privileges are required.
Example cURL requests
Create new group
curl -u username:password -H "Content-type: application/json" \
-X POST -d '{ "name" : "test_group" , "type" : "team" }' \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/parents
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
Request body
New group parameters.
| Property | Type & Description | ||||
|---|---|---|---|---|---|
groupId string Unique group Id. | |||||
name string The name of the group. | |||||
type string The type of the group. Enum: organizationunitteamrole_holders | |||||
creator object (Subject) Object representing a subject in the system, can be perceived as client (actor) identity.
| |||||
creationTime integer (Timestamp) Timestamp in seconds (UNIX epoch), e.g. | |||||
Request Examples
{
"groupId": "a4d3bc73aada63052310652d421609f1",
"name": "Test group",
"type": "team",
"creator": {
"type": "user",
"id": "7434b256e71e1052e0d5e3e9da657ebf"
},
"creationTime": 1576152793
}Responses
URI of the created group in form https://$HOST/api/onezone/v3/groups/{gid}/parents/{pid} 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."
}
}