My goal is to retrieve HTML rendered Confluence pages via the REST API in order to display pages outside from Confluence.
To achieve this the content is retrieved in storage format:
https://confluence/rest/api/content/62030518?expand=body.storage
The storage format looks like:
<ac:image ac:height=\"250\"><ri:attachment ri:filename=\"hqdefault.jpg\" /></ac:image>
Then the field "body.storage.value" is taken as input for the content body convert resource:
https://confluence/rest/api/contentbody/convert/styled_view
Excepted the embedded images, the pages are rendered correctly, including oder macros like JIRA issue macros. However, for images the HTML looks like
<img src=\"/plugins/servlet/confluence/placeholder/error?i18nKey=editor.placeholder.broken.image&locale=en_GB&version=2\" title=\"\" class=\"transform-error\" data-encoded-xml=\"%3Cac%3Aimage+ac%3Aheight%3D%22250%22%3E%3Cri%3Aattachment+ri%3Afilename%3D%22hqdefault.jpg%22+%2F%3E%3C%2Fac%3Aimage%3E\" />
According the HTML image tag there was an transformation error. Does it mean that images could not be rendered at all?
Is there a solution, e.g. fetching images first and then somehow correct broken links?