使用REST API查询批准不返回任何内容 [英] Using REST API querying Approvals returns nothing
问题描述
问候,
我使用以下内容查询我们的内部部署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预览版。有人发布了有关此问题的反馈,您可以投票支持:
最好的问候
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:
Best Regards
Limitxiao Gao
这篇关于使用REST API查询批准不返回任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!