Retrieve the HTML content from a Confluence page to display it exactly as it appears in Confluence

Hi,

I’m a bit lost and need assistance. I’m trying to retrieve the HTML content of an existing Confluence page, including the styles, images, and all other elements, so it looks exactly the same as it does in Confluence.

What is the best way to accomplish this using the REST API?

Thank you.

I’d suggest getting a page by ID with a body-format of styled_view (which comes with styles, though possibly not the global Confluence ones). That’d be a URL like this: https://{your-domain}/wiki/api/v2/pages/{id}?body-format=styled_view

1 Like