I’m interested in finding out if there’s a pagination feature available in the Azure DevOps API, specifically for listing repositories of a project using the following endpoint:
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories?api-version=7.1-preview.1
Unfortunately, based on the documentation, it appears that pagination is not supported when listing repositories.
2
Answers
You can try below API request to get the paginated output while listing repositories:-
My API with top parameter :-
My API with top and skip paramater:-
Powershell request:-
Output:-
Reference:-
Azure-devops rest api – pagination and rate limit – Stack Overflow
Yes, it’s true.
I used script to create 210 repositories, even with ‘&top=100’ in rest api url, it will still return all repositories.
For other rest api, you can refer to the answer here.