Hi, I'm using the Azure DevOps REST API to do a code search. I have been following the instructions in the article "Code Search Results - Fetch Code Search Results" from here: https://learn.microsoft.com/en-us/rest/api/azure/devops/search/code-search-results/code-search-results-fetch-code-search-results?view=azure-devops-rest-6.0.
We're running on-premises Azure DevOps Server 2020 Update 1 RC2 and I have the API working when I just specify the search text.
I send my POST request to our server like this: https://azure-devops/tfs/NES%20Applications/_apis/search/codesearchresults?api-version=6.0-preview.1
With a body like this:
{
"searchText": "CISXloc",
"$skip": 0,
"$top": 100
}
My question is how to use the Filters in the CodeSearchRequest. I can't find any documentation on the options for this. I'm trying to search only in files of a specific extension. Using the sample in the link above, I was attempting to try this with Path, but it seems I must specify Project and Repository, and my aim is to search across all projects and repositories in the collection, as I can do in the web user interface.
Does anyone have pointers on using Filters in general, and for the specific case of searching for the text in a file of a specific extension?
Thanks!