Using GitLab, projects are missing from the API list

I just tested this and it looks like the GitLab API response is using pagination. According to the documentation (http://api.gitlab.org), the default number of results per page is set to 20 and the starting page is 1.

To adjust the maximum results per page, you need to use the per_page variable in the HTTP request line. You can change the page number by using page as well, if you have more repositories than the maximum value of per_page. You can specify a maximum per_page value of 100.

For example, you request may look like:

https://git.example.com/api/v3/projects/all?page=1&per_page=100&private_token=abc123

The page and per_page variables are not required as they have default values, so you do not need to include either if you don't want to.

Hopefully this solves your problem.

Tags:

Gitlab