All, I am trying to get the list of all the files that are in a particular repo in TFS GIT using REST API. I found the below one but it only display the contents of the specific file name mentioned after "scopePath=/buld.xml", it only display the contents of file build.xml.
But I am trying, only to list all the files that are in a particular repository with out mentioning the particular file name.
Please help me.
https://{accountName}.visualstudio.com/{project}/_apis/git/repositories/{repositoryId}/items?items?scopePath=/&api-version=4.1
The Team Foundation Server APIs are based on REST, JSON and service hooks - all standard web technologies broadly supported in the industry. The REST APIs documented here are for older versions of the APIs (TFS 2015 up to TFS 2018 Update 1).
To access Azure DevOps API's, first, we need to authenticate against the Azure DevOps organization. There are several ways to authenticate to Azure DevOps, using Azure Active Directory, OAuth or using a Personal Access Token. You need to choose Authentication mechanism depends on your business scenarios.
From your web browser, open the team project for your Azure DevOps organization, and then choose Repos > Files to open the Files view. In the Files view, choose Clone to launch the Clone Repository popup. Copy the clone URL from the Clone Repository popup.
You can use the api below:
https://{accountName}.visualstudio.com/{project}/_apis/git/repositories/{repositoryId}/items?recursionLevel=Full&api-version=4.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With