Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello everyone,
I am trying to retrieve the jira issues linked in a Confluence page by using REST API, but it seems not possible.
When I try the following URLs:
/rest/api/content/{pageId}
/rest/api/content/{pageId}/property
/rest/api/content/{pageId}?expand=metadata
/rest/api/content/{pageId}?expand=body
It doesn't appear anywhere any related info with Jira issue links a Confluence page has. Is that even possible? Because I've searched in REST API docs and didn't find anything related to it.
Thanks in advance,
Jesús
Hello Jesús,
You can achieve this using {{/rest/api/content/{pageId}?expand=body}} by adding the storage component at the end so your URL will look like this:
/rest/api/content/{pageId}?expand=body.storage
This will give you the storage format of your page where you will be able to see your Jira issue macros.
They have the following format:
<ac:structured-macro ac:name="jira" ac:schema-version="1">
Cheers,
Manu
Hello Emmanuel,
Thanks for your reply.
The solution you provided works well if I add a Jira macro to my page. However, that's not necessary if we want to have a Jira issue linked to a Confluence page.
If we link a issue to a page from Jira, no macro is added to a page and both are linked as well. Several pages of my Confluence instance are linked with this method.
Anyway, thanks for your solution! I hope it could be useful for someone.
Kind regards,
Jesús
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jesús,
Did you find any solution? Same problem here.
Kind regards,
Gianluca
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gianluca,
I'm afraid there is no suitable solution using REST API in Cloud version, at least from my experience's point of view.
The only way I could get these info was writing a Node.js script that polls remote links from Jira Cloud issue, saving this info in a database/file and reading this database from Confluence macro.
Keep in mind this workaround was implemented for a very specific use case. I would try to use Jira issue macro instead.
Hope it helps.
Jesús
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.
Hi Stephens,
Thanks for your reply. I've checked the two links you provided, but I don't see how they can help me.
I think some important details of my context are missing. I am developing an add-on in Confluence Cloud, using ACE. I need somehow to get this info by making a request to the Confluence Cloud instance.
Since those links are related to Jira Server they can't address this problem.
Sorry for the missing info.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register Now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.