Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an issue link to a Confluence page with the REST API

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2022

I've seen lot's of documentation and tutorials for how to create issue links to other issues in Jira. However, I'm not finding any documentation for how to create a link to a Confluence page with the REST API. Does anyone have any experience doing this?

1 answer

1 accepted

1 vote
Answer accepted
Hana Kučerová
Community Champion
April 12, 2022

Hi @Davin Studer ,

I believe these need to be created as remote links, see here.

Request body will probably look something like this:

{
"globalId": "appId=your-confluence-app-id&pageId=your-confluence-page-id",
"application": {
"type": "com.atlassian.confluence",
"name": "your-confluence-name"
},
"relationship": "mentioned in",
"object": {
"url": "your-confluence-base-url/pages/viewpage.action?pageId=your-confluence-page-id",
"title": "Page",
"icon": {},
"status": {
"icon": {}
}
}
}
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2022

Thanks. I actually found this as well by looking at the Jira REST browser and did a GET on an issue that I knew had a Confluence link and looked at the returned JSON. After a little trial and error I was able to get it working.

Like # people like this
Leon Lehmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2022

How do you get the Confluence App ID? I am trying to create a remote issue link in a forge app while handling an issue event in Jira, but can't find a way to retrieve the Confluence App ID.

Suggest an answer

Log in or Sign up to answer