如何查询我们所有可用项目的Rally实例?
...
"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调用的用户帐户确实是订阅管理员。我和我们的管理员尝试了一些事情来尝试缩小问题范围,并注意到一些事情:
答案 0 :(得分:2)
这应该可以通过查询“订阅”类型来实现。确保在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"
}
]
]
}
答案 1 :(得分:1)
REST URL看起来像这样
https://rally1.rallydev.com/slm/webservice/1.29/subscription?fetch=Workspaces,Name,Projects
答案 2 :(得分:0)
我在邮递员中尝试了基本身份验证:集会的用户名和密码: 所有API都是相互关联的:让我们一步一步看,并始终在您的回复中注意_ref。
第1步:首先要订阅。
https://rally1.rallydev.com/slm/webservice/v2.0/subscription?fetch=Workspaces,Name,Projects
假设它是X,它将返回订阅ID。
步骤2:在该订阅中找到工作区。输入X值作为订阅,如下所示。
https://rally1.rallydev.com/slm/webservice/v2.0/Subscription/X/Workspaces
它将返回工作区ID。让我们说Y。
第3步:在工作区中找到项目。
https://rally1.rallydev.com/slm/webservice/v2.0/Workspace/Y/Projects?fetch=ObjectID
响应中将包含指向与您的工作空间关联的项目的URL。
OR
如果您知道工作空间ID,请在下面的api中使用:your_WS_id =您在以下请求中的工作空间ID。只需更换它即可。
https://rally1.rallydev.com/slm/webservice/v2.0/Workspace/your_WS_ID/Projects?fetch=Name
我希望这会有所帮助。