VSTS Release API文档 [英] VSTS Release API Documentation

查看:90
本文介绍了VSTS Release API文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的文章中,使用VSTS发布API获取与发布相关的所有工作项:

In the following post uses the VSTS release API to get all the work items associated with a release: VSTS find workitems between two releases

它使用以下调用:

https://{account}.vsrm.visualstudio.com/[teamproject]/_apis/Release/releases/{current release id}/workitems?api-version=4.1-preview.1&baseReleaseId={compare release id}

workitems:

workitems isn't listed in the VSTS API documentation: https://docs.microsoft.com/en-us/rest/api/vsts/release/releases/get%20release?view=vsts-rest-4.1

有没有我根本找不到的更完整的列表?是否有可能获得类似于以下内容的提交列表:

Is there a more complete list available that I simply can't find? Is it possible to get the list of commits similar to:

推荐答案

大多数REST API都记录在这里:

Most of the REST APIs are documented here : Visual Studio Team Services REST API Reference

但是未记录一些相关的REST API.对于这些REST API,我们可以使用诸如 Fiddler 之类的工具,或直接按 F12 -在Chrome中network进行跟踪.

However some related REST APIs are not documented. For these REST APIs we can use tools such as Fiddler or directly press F12 - network in Chrome to track them.

根据我的测试,没有这样的REST API可以直接从Release中检索比较的提交.实际上,不同的提交是通过几个REST API检索的,从相应的变更集获取信息,然后将它们进行比较...

Based on my test, no such a REST API can directly retrieve the compared commits from Release. Actually the different commits are retrieved by several REST APIs, get information from corresponding changesets then compare them...

因此,如果要使用REST API获得不同的提交,则需要从以前的版本中检索变更集ID,并在当前版本中检索变更集ID.然后比较它们.

So, if you want to get the different commits with REST API, you need to retrieve the changeset ID from previous release and the changeset ID in current release. then compare them.

例如:

POST : https://{account}.visualstudio.com/{project}/_api/_versioncontrol/history?api-version=5.0-preview.1

Request Body:

{"repositoryId":"","searchCriteria":"{\"itemPaths\":[\"$/0522TFVCScrum/PS\"],\"fromVersion\":\"180\",\"toVersion\":\"183\",\"top\":50}"}

这篇关于VSTS Release API文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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