Reputation: 77
Hi I am having a web service.
https://rally1.rallydev.com/slm/webservice/v2.x/defect/objectId
What I want to do is instead of objectId
search defect by using Formatted Id
.
How can I do it?
Upvotes: 2
Views: 1758
Reputation: 67
It is easier if you use "query" parameter over defect entity directly like:
https://eu1.rallydev.com/slm/webservice/v2.0/defect?query=(FormattedID = DEXXXXX)&fetch=Name,ObjectID
Regards.
Upvotes: 1
Reputation: 144
You can find appropriate objectId by formattedID using Rally Lookback API request. For example: I need search objectId of Test Case named TC12345. So I must send following GET query:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/WORKSPACE_ID/artifact/snapshot/query.js?find={"_UnformattedID":12345,"_TypeHierarchy":"TestCase"}&fields=["ObjectID"]
Where:
WORKSPACE_ID is the your workspace personal number which you can obtain on this page https://rally1.rallydev.com/slm/doc/webservice/objectModel.sp
UnformattedID = 12345 = numerial part of TC12345
Output can be (see searched "ObjectID: 22697085352" at the very end):
{
_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
}-
-
}
Upvotes: 1