Hi
I 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.storage
but it won't give the pure html. It contains elements like "ac:structured-macro ac:name" etc
Thanks
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,
Camilo GalleguillosSr. Technical ConsultantServiceRocket |
Hello @Asif Bhat !
You can use ?expand=body.view. This will get the HTML view representation of the page body.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.