Using Python and the Confluence Rest API I can return the JSON for a page, given its page id, e.g. https://confluence.xxx.com/rest/api/content/1234567890
within that page I created a small table. I want to 1. find the table and 2. return the contents of the table.
From reading the documentation I think I need to expand the body of the page, but I'm having trouble determining the correct syntax for the URL.
Could someone please help???
welcome to the Atlassian community!
You need the following rest API https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-wiki-rest-api-content-get to get content and then find your portion of page.
Hope this helps,
Fabio
@Fabio Racobaldo _Herzum_ thanks for your help. I'm now able to see the table information using the following url, but it's all in html, which I guess I'd have to parse to extract the data.
https://confluence.xxx.com/rest/api/content/123456789?expand=body.view
Is there a better way to get at the table, e.g. by somehow treating it as a Confluence object within that page? Or will I have to parse the html to get at the data within the table?
-Stuart.
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.
Agreed. Also trying to download a table from the Confluence API and it's downloading the entire HTML of the page and not the table object specifically...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.