Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

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.

...

  • Token of a user / service-user which has admin role (chat.admin.all) assigned → <yourToken>

  • The base URL of your application → <baseUrl>

Panel
panelIconId2139
panelIcon:information_source:
panelIconTextℹī¸
bgColor#E6FCFF

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>

...

Code Block
{
    "data": {
        "updateGroup": {
            "id": "<groupId>",
            "name": "<groupName>"
        }
    }
}

Updating Metadata

The same cURL command can be used to add/update metadata to a group. The metadata can be passed within the parameter named configurationin the input object.

Below you can see an example where the metadata with key location with a value switzerland is added to the group specified with <groupId>.

Code Block
curl --location 'https://gateway.<baseUrl>/scope-management/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <yourToken>' \
--data '{"query":"mutation UpdateGroup($updateGroupId: String!, $input: GroupUpdateInput!) {\n  updateGroup(id: $updateGroupId, input: $input) {\n    id\n  }\n}","variables":{"updateGroupId":"<groupId>","input":{"configuration": {"location": "switzerland"}}}}'

Deleting Groups

A group can be delted as follows, make sure the groups do not have members anymore.

...