We use Gitlab 7.8, i'm trying to get full list of groups on our prod server via gitlab api, unfortunately gitlab api is returning only 20 groups out of 80 available group. Any help in this would be appreciated.
command used is curl -k --header "PRIVATE-TOKEN: token of admin users" https://server_name/api/v3/groups
Running this as admin and adding admin account to all the groups didn't help either.
20 is the default number of results returned by GitLab API
You could pass the per_page=80
parameter, to get your 80 expected groups.
As well as the 'per_page=100' I would also recommend using 'page=' also, if you have more repositories than the maximum value of per_page. You can specify a maximum per_page value of 100.
Something like curl -k --header "PRIVATE-TOKEN: token of admin users" https://server_name/api/v3/groups?page=1&per_page=100
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With