gpt4 book ai didi

rally - 如何通过 REST API 获取 Rally 实例中所有项目的列表?

转载 作者:行者123 更新时间:2023-12-02 00:24:43 26 4
gpt4 key购买 nike

如何查询我们所有可用项目的 Rally 实例?

REST 调用的输出 https://rally1.rallydev.com/slm/webservice/1.29/subscription.js?fetch=Workspaces,Name,Projects&pretty=true

...
"Workspaces": [
{
"_rallyAPIMajor": "1",
"_rallyAPIMinor": "29",
"_ref": "https://rally1.rallydev.com/slm/webservice/1.29/workspace/1376977801.js",
"_objectVersion": "10",
"_refObjectName": "Workspace 1",
"Name": "Workspace 1",
"Projects": [ {
"_rallyAPIMajor": "1",
"_rallyAPIMinor": "29",
"_ref": "https://rally1.rallydev.com/slm/webservice/1.29/project/2510231094.js",
"_objectVersion": "3",
"_refObjectName": "Layout",
"Name": "Layout",
"_type": "Project"
}],
"_type": "Workspace"
},
{
"_rallyAPIMajor": "1",
"_rallyAPIMinor": "29",
"_ref": "https://rally1.rallydev.com/slm/webservice/1.29/workspace/1462743357.js",
"_objectVersion": "8",
"_refObjectName": "Bugzilla Workspace",
"Name": "Bugzilla Workspace",
"Projects": [ {
"_rallyAPIMajor": "1",
"_rallyAPIMinor": "29",
"_ref": "https://rally1.rallydev.com/slm/webservice/1.29/project/2510231094.js",
"_objectVersion": "3",
"_refObjectName": "Layout",
"Name": "Layout",
"_type": "Project"
}],
"_type": "Workspace"
},

...

更新 #2
用于 API 调用的用户帐户确实是订阅管理员。我和我们的管理员一起尝试了一些事情来尝试缩小问题的范围,并注意到一些事情:
  • 调用中返回的项目不是api用户是
  • 团队成员的项目。
  • 当我们将故事分配给 api 用户并刷新 REST 调用的结果时,每个工作区中返回的项目都是相同的,并且似乎是我们从中分配故事的项目的给定工作区中的所有项目。例如,我粘贴了返回的顶部:http://khayes.privatepaste.com/cfc730dcf8
  • 看来这个特定的 REST 调用有一个错误。
  • 最佳答案

    这应该可以通过查询“订阅”类型来实现。确保在 Fetch 中包含工作区和项目(以及您可能需要的任何其他数据,如名称)。

    https://rally1.rallydev.com/slm/webservice/1.29/subscription.js?fetch=Workspaces,Projects,Name&pretty=true

    结果应该是这样的:
    {
    _ref: "/subscription/1.js",
    _refObjectName: "My Subscription",
    Workspaces: [
    _ref: "/workspace/2.js"
    _refObjectName: "My Workspace",
    Projects: [
    {
    _ref: "/project/3.js"
    _refObjectName: "Project 1"
    }
    ]
    ]
    }

    关于rally - 如何通过 REST API 获取 Rally 实例中所有项目的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9267370/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com