API don't brings all branches listed in repository

Hello, there!

I’m trying to list all branches in my repository thought gitlab API but it just show me some branchs. How can I fix this?

Command: curl --header “PRIVATE-TOKEN:my_private_token” “https://my_gitlab_url/api/v4/projects/my_project_id/repository/branches/” > text.txt

The branch was created today and it’s listed on GUI.
Info: GitLab Community Edition 13.12.1

Thanks for taking the time to be thorough in your request, it really helps! :blush:

I discovered the problem myself in this documentation. Basically, the default return of GitLab API brings just 20 elements. So, a just add the follow parameters in the end of URL: per_page=*num*. Then, the command should have the follow URL: curl --header “PRIVATE-TOKEN:my_private_token” “https:// my_gitlab_url/api/v4/projects/my_project_id/repository/branches?per_page=100”