The new user management UI enables you to assign users to groups. But creating new groups is currently not available via UI. So this is a guide which leads you through the calls needed for it.
Preferences
Token of a user / service-user which has admin role (chat.admin.all) assigned → <yourToken>
The base URL of your application → <baseUrl>
Check here how to get a token: How to get a Token for our APIs
Fetching groups
With the following cURL you can fetch all available groups of the organisation the user/service-user belongs to. Just replace the following placeholders: <baseUrl> / <yourToken>
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
As you can see the groups can be hierarchical. This is something to keep in mind when creating new groups.
Creating a group
Before creating a group you need to know how you want to organise your organisation/company. As default there is a Root Group
created where all users (also new ones) get assigned on signup. Groups can be hierarchical. Imagine a setup where you have the Root Group
and create a new group with IT
and the parent is the Root Group
and another group called Development
with the parent IT
. People added as member to the group Development
will automatically also gain access to the scopes/spaces of this group itself and all parent groups. With this setup you are able to replicate the organisation chart of your company and manage access. Its also possible to have a flat hierarchy of groups with multiple “root groups” and no parents or children.
Now lets create a group. This can be done with this cURL. Just replace the following placeholders: <baseUrl> / <yourToken> / <groupName> / <parentId>
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Now this group is visible in the UI and users with the user management permission are able to assign and remove users from this new group.
Updating Groups
In case you did a typo or a name of a group changed you can update an existing group with the following cURL. Just replace the following placeholders: <baseUrl> / <yourToken> / <groupId> (ID of the group you want to change) / <groupName> (new name you want to set)
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Code Block |
---|
{ "data": { "updateGroup": { "id": "<groupId>", "name": "<groupName>" } } } |
Conclusion
Now you should be able to fetch, create and update groups via the API.
...