[英]How to find Azure Build Items for a specific repo
I am trying to fetch the list of all build items in Azure, and using Postman the following URL shows me the result:我正在尝试获取 Azure 中所有构建项目的列表,并使用 Postman 以下 URL 向我显示结果:
https://dev.azure.com/MyOrganization/MyProject/_apis/build/builds?api-version=6.0
But there is one problem, the query shows me the build for all our company projects whereas I am only intersted in one但是有一个问题,查询显示了我们所有公司项目的构建,而我只对一个感兴趣
The query returns for all projects, but I am only interested in build for Project B查询返回所有项目,但我只对项目 B 的构建感兴趣
How can I specify this information in the API?我如何在 API 中指定此信息? I tried the filters and it doesn't work.
我尝试了过滤器,但它不起作用。 Also the same for tags
标签也一样
If you take a look at the API Build List documentation , you can see the optional parameters that can be passed to this request如果您查看API Build List 文档,您可以看到可以传递给此请求的可选参数
In this case, you would want to filter on builds from the project B repository, which requires the repositoryType parameter to be passed as well.在这种情况下,您可能希望过滤来自项目 B 存储库的构建,这也需要传递 repositoryType 参数。 As such you'd be looking to call
因此,您希望致电
https://dev.azure.com/{organization}/{project}/_apis/build/builds?repositoryID={repoID}&repositoryType=Git&api-version=6.0
Where the repoID can be found be going into project settings-->repository, clicking the project B repo and copying the value that appears in the website URL after repo=可以找到repoID的地方是进入项目设置-->存储库,点击项目B repo并复制repo =后网站URL中出现的值
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.