Search code examples
confluenceconfluence-rest-api

Downloading Confluence Page Content


I am downloading a confluence page content (consist table data).But from few days ,It is returning dynamic page content(html,internal javascript) without tabular data.it appears that Atlassian has CHANGED the way they render tables in the Confluence wiki (there was a major UI upgrade recently). When last I did this, the page contents were formatted into a table already so there was parsable HTML available to me.

I hope there must be other people facing/faced same issue.

curl.exe -u "${user}:${pass}" -L "$page" | Set-Content -Encoding UTF8 $raw

Solution

  • I am able to download page content using confluence API, followed below steps

    • Have identified page id
    • build api uri and hit using curl

    curl -u "robot":"xxxxxxx" -L "https://xxxxxx.atlassian.net/wiki/rest/api/content/{id}?expand=body.storage" > ember.html

    The result html content would save in ember.html