Guna
Guna

Reputation: 81

Gitlab api to list only parent groups

I am having few thousands of groups in GitLab and each group has one or more subgroups in them.

The /api/v4/groups is listing all the groups. Is there an API available just to filter and list only the parent groups?

Appreciate your help!!

Upvotes: 0

Views: 404

Answers (1)

Guna
Guna

Reputation: 81

Just found the solution.

Have to pass the below argument in api call

top_level_only=yes

This will ensure giving only the top level groups.

Happy to share knowledge 😊

Upvotes: 0

Related Questions