User groups
Create group#
Creates a new group. Returns the created Group object.
Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| externalId | String | Group external id | true |
| name | String | Name of the group | false |
| description | String | Description | true |
| blockWebAccess | Boolean | Blocks access to the web interface for all users of the group | false |
| active | Boolean | Whether the group is active. Default true | true |
| userIds | List of integers | Identifiers of users to add to the group | true |
| roles | List objects | Roles granted to every member of the group, as a list of {name, description} objects | true |
Examples
200 OK
Update group#
Updates an existing group by id. Returns the updated Group object.
Both
Both
userIds and roles must be present in the body (use an empty array if there's nothing to set) โ omitting either one causes a 500 Internal Server Error.Request body:
| Attribute | Type | Description | Nullable |
|---|---|---|---|
| externalId | String | Group external id | true |
| name | String | Name of the group | false |
| description | String | Description | true |
| blockWebAccess | Boolean | Blocks access to the web interface for all users of the group | false |
| active | Boolean | Whether the group is active | true |
| userIds | List of integers | Identifiers of users in the group. Required โ pass an empty array to keep the group empty | false |
| roles | List objects | Roles granted to every member of the group, as a list of {name, description} objects. Required โ pass an empty array for none | false |
Examples
200 OK
List groups#
Returns a list of Group objects
Request parameters:
| Request Parameter | Type | Description | Required |
|---|---|---|---|
| name | String | Find group by name | false |
| ids | List of integers | Find groups by ids | false |
| fields | List of string | Additional group fields to include in the response object. Available values: roles, users | false |
| userId | Integer | Find groups the given user belongs to | false |
| skipUserId | Integer | Find groups the given user does NOT belong to | false |
| businessDirIds | List of integers (comma-separated) | Find groups by business direction ids | false |
| onlyActive | Boolean | Get only active groups. Default true | false |
Examples
200 OK
Get user groups#
Get groups available to user#
Returns a list of Group objects the given user does not currently belong to โ useful for building an "add to group" picker.
Examples
200 OK
Add user to groups#
Adds the user to the given groups, in addition to the groups they already belong to.
Examples
200 OK
Replace user groups#
Replaces the user's groups with the given ones โ groups not in the list are removed.
Examples
200 OK
Remove groups from user#
Removes the given groups from the user; other groups the user belongs to are left as is.
Examples
200 OK
Remove all groups from user#
Removes the user from all groups they belong to.
Examples
200 OK