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

查看:16
本文介绍了Lookback 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:

  • 将 403 错误从 Rally 服务器返回给用户,而不会向他们提供有关所请求指标的有用信息.
  • 将一组可见"团队传递给 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 添加到请求的 url,它将过滤掉您想要的响应,而无需提供每个项目.

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.

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

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