Get URL to view resource in UI given its resource ID and/or key

Hi,
in the Jira Platform Server REST API, I can get a URL to click on and go to Jira and view a dashboard (see Jira 8.22.3). It’s returned as part of the resource from the GET.

I don’t seem able to do this with issues though (which are also part of the platform server REST API).

In the Jira Software Server (Agile) REST API also , I don’t seem to be able to get any ‘view’ properties with a URL I could click to take me to the Jira UI to view the resource (e.g., epic, sprint, board,…).

Is it possible, given a resource id and/or key, to get or generate a URL to that item in the Jira UI?

thanks in advance

Hello @BlindGumption

You don’t need the REST API to tell you the path to any issue (Epic, Story, Bug etc) resource anyhow, all you need is the issue’s key and the URL to your Jira instance, then concatenate the two together with the intermediate part needed, to make a final URL that will result in the resource being opened directly:

URL = "https://yourjirainstance.atlassian.net"
Intermediate = "/browse/"
Key = "BPT-226"
FinalURL = URL & Intermediate & Key

For Boards, you use the same method, but construct the final URL to start with the URL that causes Boards to be displayed, followed by the Board’s ID.

For Sprints, there is no user window that is specific to a Sprint based on its ID, as Sprints are only shown to the user in the context of a Board, so there is no ‘absolute URL’ to Sprints.

3 Likes

Awesome, thanks @sunnyape! that ‘browse’ was the part I was missing.

For boards, I’m using, for example,
https://jira.company.com/secure/RapidBoard.jspa?rapidView={boardId}

then for a sprint I tack on to that,

&sprint={sprintId}

Interesting that the dashboard resource explicitly returns a ‘view’ property but no other resource appears to.

thanks for your help!