'Azure Devops API - how to filter/search by project name?
I'm using the GET project List API and I want to filter out the results by a search query parameters.
I have multiple projects under a certain organization and I want to get back only the projects that start with some 'name' initial. I looked everywhere on the documentation but couldn't find any way doing such a query. Is there a way to narrow down the results?
I saw that some API's have the ?$filter={filter} query param, but it won't work on projects filtering.
Solution 1:[1]
As you said, it's impossible in this API to filter the results before you get them.
You only can filter the projects after you get the reulsts with Bash/Powershell etc.
Solution 2:[2]
I run into similar issue, except I am trying to filter base on Azure Devops's Repo list.
It seems M$ has done a terrible job in providing consistent filters features.
I did notice some of the API does provide ?$filter={filter} and I found documentation here would probably help?
Some of the API provides a different search method in form of search criteria /commits?searchCriteria.$skip={searchCriteria.$skip}&searchCriteria.$top={searchCriteria.$top}...
https://docs.microsoft.com/en-us/rest/api/azure/devops/git/commits/get-commits?view=azure-devops-rest-6.0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shayki Abramczyk |
| Solution 2 |
