Gitlab api get a list of groups total 20 groups not all

We are using Gitlab 7.8, I am trying to get a complete list of groups on our prod server via gitlab api, unfortunately gitlab api returns only 20 groups from 80 available groups. Any help on this would be appreciated.

command used is curl -k --header "PRIVATE-TOKEN: token of admin users"  https://server_name/api/v3/groups

Performing this as an administrator and adding an administrator account to all groups did not help either.

+4
source share
2 answers

20 is the default number returned by the GitLab API

You can pass a parameter per_page=80to get 80 expected groups.

+4
source

'per_page = 100', 'page =', , per_page. per_page 100.

- curl -k --header "PRIVATE-TOKEN: token of admin users" https://server_name/api/v3/groups?page=1&per_page=100

+1

Source: https://habr.com/ru/post/1584467/


All Articles