Rally Rest Api:通过格式化ID获取缺陷

时间:2014-02-14 13:22:32

标签: web-services

您好我正在使用网络服务。

https://rally1.rallydev.com/slm/webservice/v2.x/defect/objectId

我想要做的是使用objectId代替Formatted Id搜索缺陷。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

您可以使用Rally Lookback API请求通过formattedID找到适当的objectId。 例如:我需要搜索名为TC12345的测试用例的objectId。所以我必须发送以下GET查询:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/WORKSPACE_ID/artifact/snapshot/query.js?find= {" _UnformattedID":12345" _TypeHierarchy":"测试用例"}&安培;字段= ["的ObjectID&#34 ]

其中:

输出可以是(参见搜索" ObjectID:22697085352 "最后):

{
_rallyAPIMajor: "2"
_rallyAPIMinor: "0"
Errors: [0]
Warnings: [0]
ThreadStats: {
cpuTime: "10.0"
waitTime: "0"
blockedTime: "1"
waitCount: "1"
blockedCount: "2"
}-
Timings: {
preProcess: 0
findEtlDate: 36
allowedValuesDisambiguation: 1
mongoQuery: 9
authorization: 3
formattedId: 0
suppressNonRequested: 0
allowedValuesHydration: 0
compressSnapshots: 0
TOTAL: 49
}-
GeneratedQuery: {
find: {
_UnformattedID: 619
_TypeHierarchy: {
$in: [3]
0:  -51012
1:  9467271631
2:  10486304042
-
}-
_ValidFrom: {
$lte: "2014-09-16T14:21:35.731Z"
}-
}-
limit: 100
skip: 0
fields: {
ObjectID: 1
Project: 1
}-
}-
TotalResultCount: 1
StartIndex: 0
PageSize: 100
ETLDate: "2014-09-16T14:21:35.731Z"
Results: [1]
0:  {
ObjectID: 22697085352
}-
-
}