How to list public groups of a user in Gitlab?

Viewed 97

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).

1 Answers

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.

Related