Using the Rally REST API, how can I get the non-API (website) URL for a user story?

StackOverflow https://stackoverflow.com/questions/10538441

  •  07-06-2021
  •  | 
  •  

Domanda

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?

È stato utile?

Soluzione

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...

Altri suggerimenti

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}

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top