Getting a list of Git repositories programmatically using the REST API

In this recipe, you'll learn how to get a list of Git repositories in a Team Project programmatically using the GitHttpClient REST API.

Getting ready

Refer to instructions in the Getting ready section of the Getting build details programmatically using the REST API recipe for setup details. Download the RESTDemo solution provided with the course material. In this recipe, we'll be going through the GetGitRepos project to get a list of Git repositories with details from a Team Project.

How to do it…

  1. In the RESTDemo solution, set GetGitRepos as the startup project:
    How to do it…
  2. Run the GetGitRepos ...

Get Microsoft Team Foundation Server 2015 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.