3

I want all the public groups of a particular user in gitlab. Is there any API or any other way to achieve it.

https://gitlab.com/api/v4/groups If I use this API without providing any authentication token, it gives me all the public groups in GITLAB. But my requirement is to get all public groups of a particular user(using user_id).

aman
  • 33
  • 6

1 Answers1

0

There is no direct way to list a user's groups.

The closest way to do this would be to list all groups and then use the memberships API to see if the user is in a particular group.

sytech
  • 29,298
  • 3
  • 45
  • 86