Get all commits from the gitlab api in a specific period

I have been trying to work with the gitlab api to get all my commits back between now and 2 months ago. The problem I have been running into is that I dont get more then 20 commits back. Nowhere i can find how to change it.
This is the link I have been working with:
https://gitlab.com/api/v4/projects/xxx/repository/commits?ref_name=master&since=2019-06-01T20:10:10Z&until=2019-09-01T20:10:10Z&all=true

thanks for your help

Hi @RoelVoordendag and welcome to the GitLab Community forums.

It sounds like you’re hitting the default of 20 items listed per page in the api (default: 20 , max: 100 )

https://docs.gitlab.com/ee/api/#pagination

To print the max of 100 results per “page”, use &per_page=100.
To fetch more than one hundred, you’ll need to use per_page=100 in combination with &page=#, incrementing page number by 1 for each set of 100 results.

https://gitlab.com/api/v4/projects/xxx/repository/commits?ref_name=master&since=2019-06-01T20:10:10Z&until=2019-09-01T20:10:10Z&all=true&per_page=100&page=x
3 Likes

Thanks for the help!

1 Like