Paul Hatcher
Paul Hatcher

Reputation: 8156

Search Azure DevOps git repository via REST API

Using the Microsoft.TeamFoundationServer.ExtendedClient I can connect to a Azure DevOps project and get a git client e.g.

   var connection = new VssConnection("https://dev.azure.com/myorg", new VssBasicCredentials(string.Empty, "patToken"));
   var client = await connection.GetClientAsync<GitHttpClient>().ConfigureAwait(false);

I can see methods to get items from the repository, what I can't see are any search methods as github provides - do they exist?

Upvotes: 0

Views: 1144

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59020

You need to use the Code Search APIs, not the Git APIs. The Git APIs are more focused on providing methods for interacting with Git repos, as opposed to searching for items within a Git repo.

Upvotes: 1

Related Questions