有没有一种方法可以在Azure DevOps Api 5.1中找到发布的工作项? [英] Is there a way to find the workitems for a release in Azure DevOps Api 5.1?

查看:86
本文介绍了有没有一种方法可以在Azure DevOps Api 5.1中找到发布的工作项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过请求

获取ID后,如果需要使用

3.对于我的baseReleaseId ,我不确定其含义是100%.我认为可能是 ReleaseToCompareAgainst 之类的东西.来自

希望以上所有都对您有帮助:)

I can find a release in Azure DevOps Api 5.1 by a request to https://vsrm.dev.azure.com/mycompany/myproject/_apis/release/releases/myreleaseid?api-version=5.1

How can I get the workitems of that release as shown on the devops portal under Deployment - Stages - Workitems?

My naive approach just using https://vsrm.dev.azure.com/mycompany/myproject/_apis/release/releases/myreleaseid/workitems?api-version=5.1

resulted in a 404.

There is a stakeholder in the workitem and I want to send him a notification adter the release.

解决方案

How can I get the workitems of that release as shown on the devops portal under Deployment - Stages - Workitems?

Hard to say, but I don't find any document about this topic... So I determine to use F12 to find that. And here's the one I finally find:

Get:https://vsrm.dev.azure.com/mycompany/myproject/_apis/Release/releases/myreleaseId/workitems?baseReleaseId={my baseReleaseId}&%24top=250&artifactAlias={my artifactAlias}

It will returns the IDs of the workItems for the release. Its response format:

After you get the IDs, it's easy to get details if you need using Get Work Items Batch or what.

In addition:

1.myreleaseId is the ReleaseID. (On my side, the ID is 7 if it's Release-7)

2.my artifactAlias is this:

3.For my baseReleaseId, I'm not 100% sure about its meaning. I think it could be something like ReleaseToCompareAgainst. Hint from Daniel. (On my side, if my releaseId=7, then I use basereleaseID=6(7-1), it works to get the correct WIT ids). (Actually I suggest you can use F12 in that web page to check your corresponding URL.)

And according to Mathias F: The baseReleaseId realy is the last previous release that has a deployment (-1 in some cases)

4.About how to use F12 to find rest api which may not be documented:

Hope all above helps :)

这篇关于有没有一种方法可以在Azure DevOps Api 5.1中找到发布的工作项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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