使用REST API查询批准不返回任何内容 [英] Using REST API querying Approvals returns nothing

查看:102
本文介绍了使用REST API查询批准不返回任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我使用以下内容查询我们的内部部署TFS实例,以尝试获取发布的批准列表:



https://www.visualstudio.com/en-us/docs/integrate/api/rm/approvals



转给我:
$


http:// {TFS} / DefaultCollection / {Project} /_apis/release/approvals/?api-version=2.2-preview.1



注意我也尝试使用3.0-preview.1来获得具有相同结果的版本


使用此查询返回以下内容:

 {" count":0," value":[]} 

我们在TFS内部有多个版本,其中包含Approvals以及待批准的版本。我不确定为什么查询没有返回任何信息。我需要能够查询版本并将该版本的所有批准都返回给我。这个
可以完成吗?
b
$
问候,


Dewayne


解决方案

嗨DPinion76,





感谢您在此发帖。



< p style ="line-height:150%; margin-bottom:10pt">我试图再次在我的机器上重现这个问题。我发现用户无法通过此休息api获得其他批准者。但是如果批准者是他自己,他可以得到结果,如果批准者
包含多个用户,那么他只能得到"他自己" ;在结果中。


其余的api适用于TFS15。所以我建议您可以将TFS升级到TFS15预览版。有人发布了有关此问题的反馈,您可以投票支持:


https://connect.microsoft.com/VisualStudio/feedbackdetail/view / 3105898 / tfs-rest-api-for-geting-release-approvals-doesnt-work



最好的问候

Limitxiao Gao


Greetings,
I am using the following to query our on-premise TFS instance to try to obtain a list of approvals for release(s):

https://www.visualstudio.com/en-us/docs/integrate/api/rm/approvals

Which in turn gives me:

http://{TFS}/DefaultCollection/{Project}/_apis/release/approvals/?api-version=2.2-preview.1

Note I have also tried using 3.0-preview.1 for the version with the same results

Using this query returns the following:

{"count":0,"value":[]}

We have several releases within TFS, with Approvals being completed as well as pending. I am not sure why the query is returning no information. I need to be able to query a release and have all of the approvals for that release returned to me. Can this be done?

Regards,

Dewayne

解决方案

Hi DPinion76,

Thank you for posting here.

I tried to reproduce the issue in my machine again. I found that the user could not get other approvers via this rest api. But he could get the result if the approver is himself, and if the approvers contain several users, then he could only got "himself" in the result.

The rest api worked for TFS15. So I suggest that you could upgrade your TFS to TFS15 preview. And someone have posted a feedback about this issue, you could vote for it:

https://connect.microsoft.com/VisualStudio/feedbackdetail/view/3105898/tfs-rest-api-for-geting-release-approvals-doesnt-work

Best Regards
Limitxiao Gao


这篇关于使用REST API查询批准不返回任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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