HiI would like to get the content from pages but in HTML. I used this api
https://<*>.atlassian.net/wiki/rest/api/content/{id}?expand=body.storagebut it won't give the pure html. It contains elements like "ac:structured-macro ac:name" etcThanks
Hello @Asif Bhat !
You can use ?expand=body.view. This will get the HTML view representation of the page body.
Hi, @Asif Bhat, welcome to the Atlassian Community!
One way to get the actually rendered HTML code of the page is to access the developer console of your browser, and from there look for the id="main-content" element. You could copy it and paste it wherever you need it.
Another option, which would work for multiple pages, is to run a space export in HTML format. You can find it in the space settings, and it will allow you to choose the pages you'd like to include in the export. Just note that the styles in the exported files may look different.
Best,
ServiceRocketcamilo.galleguillos@servicerocket.comSantiago, Chile
I tried it. Not much dufference. It uses confluence class ids. Is there any way to get the style sheets?
The difference is that Storage is XML (xHTML) Confluence format and View is HTML format. I did not see in the question Information the stylesheets. You can try also other options for body representation in the REST documentation.
If your task is to get the full HTML and CSS/JS resources, you can find them in AUI, Atlaskit documentation that gives fill overview on the CDN resources you need to implement look and feel as in Confluence.
It looks like you're new here. Sign in or register to get started.