Would it be possible to get the HTML content of the"Page Properties Report Macro" using a REST API call ?
Hello Evangelos,
Using the REST API to get the content of a page is simplified by adding an expand to the end of your API URI. This may look something as follows:
http://example.com/confluence/rest/api/content/1234?expand=space,body.view
Using the following endpoint: GET /rest/api/content/{id}
This will allow the response to include the following within the response which will include any macros you have present:
"body": {
"view": {
"value": "<p><h1>Example</h1>Some example content body</p>",
"representation": "view",
"_expandable": {
"content": "/rest/api/content/1234"
}
}
I hope this proves helpful and you’re able to grab the content of your Confluence pages and macros without issue.
Regards,
Stephen Sifers
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.