get group memberships of a group via the gitlab api

Viewed 217

I'm trying hard to find the gitlab api request to get the group memberships of a group.

I have a (main) group called "sharing". I have added in the members-section an additional group "teacher"

Example of group membership

Is there any way to retrieve the information of the group members from the "sharing" group via the gitlab api?

If I use https://[gitlab-URI]/api/v4/groups/35/members I only get the user members, but not the group members!

1 Answers

Finally I found the answer myself:

Indeed the group memberships are available directly via the project api https://[gitlab-URI]/api/v4/groups/35/

   ...
   "shared_with_groups" : [
      {
         "group_full_path" : "teacher",
         "group_name" : "teacher",
         "group_id" : 771,
         "group_access_level" : 30,
         "expires_at" : null
      }
   ],
   ---

This was not the place I had looked for :-(

Related