Creating a user group¶
Note
A subgroup can only be created under the root group or another subgroup. Creating a user group without the attribute parent is not possible.
Note
The body does not contain the attributes id, created, and modified. The system sets the values of these attributes after the entry is created.
Note
The body may only contain the mentioned attributes. All other possible attributes of the object GroupVO are ignored.
Sending a POST request to the /user/groups endpoint.
Description¶
The Create-User-Group request allows the user to create a new user group for the organisation.
Requirements¶
Values of the request: none
Objects: GroupVO
Request¶
To create a user group for the organisation, no additional information needs to be added to the path of the request.
For a detailed specification of the information required to add a user group, one or more GroupVO objects with the following attributes must be defined in the body:
| Attributes | Description | Values |
|---|---|---|
name |
The name of the user group. | string |
parent |
The id of the parent user group. | integer |
The following attributes are optional:
| Attributes | Description | Values |
|---|---|---|
children |
An array with sub user groups of the parent user group, each presented as object GroupVO and possible other children as sub user group. |
array |
The system returns the GroupVO object containing the information about the new entry.
Example¶
Example request body:
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 201 | The request has succeeded and a new object has been created. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |