我尝试通过Rally API密钥访问Rally,并且能够连接到Rally。但是当我试图获取项目下的用户故事列表时,我得到了InvalidRallyTypeNameError。
这是我连接到Rally的代码
rally=Rally(server="rally1.rallydev.com", apikey="MyAPIkey", workspace='MyWorkspace',projectc='Helloworld')
获取项目下的故事列表
response=rally.get("project", fetch=False, limit=10) //here is where am getting the error
请告诉我,哪里出错了。
答案 0 :(得分:1)
要让项目中的用户素材点击hierarchicalrequirement
端点并将其范围限定在项目中。这是一个卷曲示例,其中zsessionid设置为ApiKey,而678是项目的ObjectID的占位符:
curl --header "zsessionid:_abc123" -H "Content-Type: application/json" https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?project=/project/678
无论语言或Api选择,您都必须查询hierarchicalrequirement对象。某些工具包可能允许使用“userstory”或“story”别名,但在WS API对象模型中,用户故事称为层次要求。此外,项目没有用户故事集合属性。
使用python toolkit进行集会时,pyral看起来像这样
response = rally.get('HierarchicalRequirement', query=criterion, fetch=fields, order="FormattedID")
您可以将条件限制为项目。