如何使用REST API列出TFS GIT存储库中的所有文件 [英] How to list all the files that are in TFS GIT repo using REST API

查看:73
本文介绍了如何使用REST API列出TFS GIT存储库中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,我正在尝试使用REST API获取TFS GIT中特定回购中所有文件的列表.我找到了下面的一个,但是它只显示在"scopePath =/buld.xml"之后提到的特定文件名的内容,它仅显示文件build.xml的内容.

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.

请帮助我.

https://{accountName} .visualstudio.com/{project}/_apis/git/repositories/{repositoryId}/items?items?scopePath=/&api-version=4.1

https://{accountName}.visualstudio.com/{project}/_apis/git/repositories/{repositoryId}/items?items?scopePath=/&api-version=4.1

推荐答案

您可以使用以下api:

You can use the api below:

https://{accountName}.visualstudio.com/{project}/_apis/git/repositories/{repositoryId}/items?recursionLevel=Full&api-version=4.1

这篇关于如何使用REST API列出TFS GIT存储库中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆