How can I get the contents of a table in a confluence page using REST API?
I was able to get the content of the page. But I just want the contents of the table as a list. Any pointers will be appreciated.
Yea there is no direct way to get just the table. You have to get all the content and then parse it yourself to get only the table. I am not sure what programming language you are using for this but for python one good library for this is called BeautifulSoup (https://www.crummy.com/software/BeautifulSoup/bs4/doc/).
There are similar libraries like this for other languages so I would look for one in your language and use it to parse the content.
This relates to the following Confluence Server Page:
This page contains examples of using the Confluence Content REST API using
curl. The responses are piped into
python -mjson.tool (JSON encoder / decoder) to make them easier to read.
you can use the following macro: https://v-and-b.atlassian.net/wiki/spaces/PD/pages/1127186433/Table+Scraper+from+URL+Macro
Here are step-by-step instructions: https://v-and-b.atlassian.net/wiki/spaces/PD/blog/2020/05/26/1142554679/How+to+Display+a+HTML+Table+from+a+URL+as+a+Confluence+Table
Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events