6

I'm using the Rally REST API to integrate user story data from Rally into another application. I have no trouble retrieving the user story data from Rally, however, I would like to provide a hyperlink for the users of the other application to click on to go to that user story within the Rally GUI (not using any API's).

For example, the URL for a user story using the REST API is something like:

https://www.rallydev.com/slm/webservice/1.30/hierarchicalrequirement/{ID}

whereas the URL that a user would use to view that story within Rally is something like:

https://www.rallydev.com/#/{ProjectID}d/detail/userstory/{ID}

Is there a way to get the GUI URL of a user story (the URL that an end user of Rally would use) from the REST API?

Kyle Morse
  • 8,390
  • 2
  • 15
  • 16
TJB
  • 63
  • 1
  • 4

2 Answers2

6

The ProjectID is actually optional, so you will get to the detail page with a link like this as well: https://rally1.rallydev.com/#/detail/userstory/12345

However this url format is not guaranteed not to change. In the new App SDK 2.0 we will make available some sort of versioned utility for building detail links for items to account for this...

Kyle Morse
  • 8,390
  • 2
  • 15
  • 16
  • 2
    Kyle, are you aware whether this was added to v2.0 of the WSAPI? I'm not finding anything in there. Are there any other object types besides "userstory" and "defect"? – Tobias J Feb 28 '14 at 19:57
  • Any updates on the status of this? Isn't too hard to make the link yourself but getting the canonical UI link from the API would be nice. – Asad Saeeduddin Jul 17 '15 at 21:50
  • https://help.rallydev.com/apps/2.0/doc/#!/api/Rally.nav.Manager-method-getDetailUrl – Kyle Morse Jul 18 '15 at 02:16
2

If you do a GET such as:

  https://rally1.rallydev.com/slm/webservice/1.30/hierarchicalrequirement/{ID}.js?fetch=Project,ObjectID

You'll get a result such as:

{"HierarchicalRequirement": {"_rallyAPIMajor": "1", "_rallyAPIMinor": "30", "_ref": "https://rally1.rallydev.com/slm/webservice/1.30/hierarchicalrequirement/<<STORYID>>.js", "_objectVersion": "129", "_refObjectName": "Story Name", "ObjectID": <<STORYID>>, "Project": {"_rallyAPIMajor": "1", "_rallyAPIMinor": "30", "_ref": "https://rally1.rallydev.com/slm/webservice/1.30/project/<<STORYID>>.js", "_objectVersion": "2", "_refObjectName": "Project Name", "ObjectID": <<PROJECTID>>, "_type": "Project"}, "Errors": [], "Warnings": []}}

You could then Pull the STORYID and PROJECTID off of the response. Then you can use the Project ObjectID from the response together with the Story ObjectID to stitch together your desired URL of:

https://rally1.rallydev.com/#/{ProjectID}d/detail/userstory/{ID}