Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
API APIs & IntegrationsAPI
APIs & Integrations
nameinternal-api-warning
nopaneltrue

...

Now lets create a group. This can be done with this cURL. Just replace the following placeholders: <baseUrl> / <yourToken> / <groupName> / <parentId>

Insert excerpt
API APIs & IntegrationsAPI
APIs & Integrations
nameinternal-api-warning
nopaneltrue

...

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
API APIs & IntegrationsAPI
APIs & Integrations
nameinternal-api-warning
nopaneltrue

...

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

Deleting Groups

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

Code Block
curl --request POST \
    --header 'content-type: application/json' \
    --header 'Authorization: Bearer <your Token>' \
    --url https://gateway.<baseUrl>/scope-management/graphql \
    --data '{"query":"mutation DeleteGroup($deleteGroupId: String!) {\n  deleteGroup(id: $deleteGroupId) {\n    id\n  }\n}","variables":{"deleteGroupId":"group_...."}}'

Conclusion

Now you should be able to fetch, create and update groups via the API.

...