What is the equivalent of VersionControlLabel and VersionControlServer in VSTS REST API RRS feed

  • Question

  • My <g class="gr_ gr_13 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="13" id="13">teams</g> projects have been migrated to Git under VSTS. My current project that is not in VSTS has references to VersionControlLabel because the project was written to target TFS API.

    I'm currently trying to upgrade my current project to connect to VSTS and I can connect to the project using the following C# code:

    VssConnection connection = new VssConnection(new Uri(vstsOrTfsCollectionUrl), new VssClientCredentials());
      //The ProjectHttpClient
       ProjectHttpClient projectClient = connection.GetClient<ProjectHttpClient>();
      //Retrieves a BuildHttpClient so we can interogate the Builds for a given project
      BuildHttpClient buildServer = connection.GetClient<BuildHttpClient>();
      //Get Basic Project - Shallow Reference
      IEnumerable<TeamProjectReference> projects = projectClient.GetProjects().Result;
     //Create client for GIT
     GitHttpClient gitClient = connection.GetClient<GitHttpClient>();
     TeamProject theProject = projectClient.GetProject(projectName).Result;
     List<GitRepository> gitRepositoryList = gitClient.GetRepositoriesAsync(theProject.Name).Result;
     Is there an equivalent of this in the new REST API that Microsoft has released because <g class="gr_ gr_30 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="30" id="30">i</g> would like to access the changeset/commit information of the project(s) 
     that are currently in Git.

    Wednesday, August 1, 2018 8:18 AM

All replies

  • Hi IndusKing,

    Thank you for posting here.

    Since your question is more related Git, you could post a new thread in StackOverFlow.

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.


    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 2, 2018 7:33 AM