回顾API:仅返回可见的工作项 [英] Lookback API: Return visible work items only

查看:81
本文介绍了回顾API:仅返回可见的工作项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用LBAPI来缩小工作区中的项目组合范围时,我们遇到了一些问题.由于许多团队为一个项目做出贡献,并且试图对这些项目进行度量的用户可能并不总是拥有对所有做出贡献的团队的查看权限,因此我们面临着以下两种选择之一:

We are having several issues using the LBAPI to scope down from the portfolio items in our workspace. Since many teams contribute to a single project, and a user trying to pull metrics on these projects might not always have view access to all the contributing teams, we are faced with one of two options:

  • 将Rally服务器中的403错误返回给用户,使他们没有有关所请求指标的有用信息.
  • 将一系列可见"团队传递给LBAPI,该LBAPI仅返回我有权查看的团队的工作项.

因此,逻辑过程是首先查询时不使用团队过滤器,并且在遇到403的情况下,找出我有权查看哪些团队并仅查询这些团队.我不必介意为此编写代码;只是看起来像可以通过单个API调用轻松返回的内容.理想情况下,如果用户没有对任何团队的查看权限,则将返回该团队的对象ID的数组并显示错误,以便用户知道请求访问哪些团队.

So, the logical process would be to query with no team filter at first, and in the event that a 403 is encountered, figure out which teams I have view access to and only query for those teams. I don't necessarily mind writing the code for this; it's just that it seems like something that could easily be returned with a single API call. Ideally, in the event that a user does not have view access to any team(s), an array of those team's Object IDs would be returned with the error so that the user knew which teams to request access to.

推荐答案

这是一个故意的设计决策.我们希望确保当两个不同的人查看同一份报告时,它们的外观相同.我们以前的报告系统的主要改进之一是能够向某人发送报告链接,并确保所有查看者都可以查看该报告.

This was an intentional design decision. We wanted to make sure that the same report would appear the same when viewed by two different people. One of the main enhancements to our previous reporting system was the ability to send someone a link to a report and be assured that the report would be viewed the same by all viewers.

我们添加了一个参数,该参数将结果限制为仅用户有权查看的快照.

We have added a parameter that will restrict the results to only the snapshots that the user has permissions to see.

如果将& removeUnauthorizedSnapshots = true添加到请求的网址,它将过滤掉您想要的响应,而不必提供每个项目.

If you add &removeUnauthorizedSnapshots=true to the url of the request it will filter out the responses you want without having to provide every single project.

这篇关于回顾API:仅返回可见的工作项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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