Hey there, I am creating issues using API, however, I cannot find URL for created issues in the response body.
How can I get the URL for a created issue using API?
Thanks!
How about this
const issueUILink = issue.self.split('/rest/api')[0] + "/browse/" + issue.key;
Hi @Joshua Sneed Contegix , @Daniel Ebers ,
Thank you for your replies. What I was actually after is URL that can be opened in a browser to navigate to the created issue. I only see API URL of the issue in the response. Sorry for not being clear in the question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like Joshua showed there is the key as a response, this is the "dynamic" part of the URL, the rest is "static" like https://yourgreatsite.atlassian.net - the task would only be to concatenate your URL + the project key.
You mentioned you see only API URL in response key. I am unsure why - could you please show an anonymized output here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zharkyn,
Plug the key into Jira's standard issue URL to access it in the UI. E.g. http://www.example.com/browse/${key}. Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in case it is still not working - could you probably post the response of your call here?
It then might be easier to dig in deeper.
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zharkyn,
The Cloud Rest API documentation for issue creation shows that the issue key and URL are returned. Atlassian's example is below.
{
"issues": [
{
"id": "10000",
"key": "TST-24",
"self": "http://www.example.com/jira/rest/api/2/issue/10000"
},
{
"id": "10001",
"key": "TST-25",
"self": "http://www.example.com/jira/rest/api/2/issue/10001"
}
],
"errors": []}
The id value is the issue ID, key value is the issue key, and the self value is the issue URL. Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.