Gitlab Api to list branches

Gitlab api to list all the branches in a repo based upon the project id does not list all the branches.
In my project there are more than 100 branches but when I list out using api it shows around 30 branch.
My Gitlab version is GitLab Community Edition 12.3.5

I am using below api after replacing all the variables

curl --header “PRIVATE-TOKEN: <your_access_token>” https://gitlab.example.com/api/v4/projects/5/repository/branches

That sounds like pagination, as described in https://docs.gitlab.com/ee/api/README.html#pagination.
By default API calls return 20 results.

1 Like