Hi,
I am trying to get a Confluence page content by using REST Api. It works, however, I am not able to get content of the Jira Macros that are part of the page.
I am using `node-fetch`
Something like:
Hi @Vaclav Vlcek and welcome to the community. There are a couple of things you can try. First, on your GET content method, try adding the following query parameter:
?expand=body.storage
In the response payload you'll see a body.storage.value which will contain page contents with generated macro output. If you want to peel off a specific macro and fetch that content, you can use the Get Macro Body by Macro ID (docs linkk) API method. With that method, you'd pass arguments like this:
/wiki/rest/api/content/{contentId}/history/{versionOfPage}/macro/id/{macroId}
and you'll get back a payload that includes generated macro data just for that single macro.
Give those a try to see if you're getting what you need. Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.