Create new group
Creates a new group.
This operation requires oz_groups_create privilege.
See also:
Create a new group for the current user
Create a new parent group for given group
Example cURL requests
Create new group of type team
curl -u username:password -H "Content-type: application/json" \
-X POST -d '{ "name":"new_group" , "type":"team" }' \
https://$HOST/api/v3/onezone/groups/$GROUP_ID
Request body
Group properties.
| Property | Type & Description |
|---|---|
name string The name of the group. | |
type string The type of the group. If not specified, Enum: organizationunitteamrole_holders | |
Request Examples
{
"name": "Test group",
"type": "team"
}Responses
URI of the group created in form https://$HOST/api/onezone/v3/groups/{id} 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."
}
}