Lookback API: Return visible work items only

不问归期 提交于 2019-12-02 08:07:25

问题


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:

  • Return the 403 error from the Rally servers to the user, giving them no useful information with regards to the requested metrics.
  • Pass an array of "visible" teams to the LBAPI which will only return work items from teams which I have view access to.

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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/17930854/lookback-api-return-visible-work-items-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!