Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Export Pages with Attachments

We want to export all of our pages in confluence space as a separate word file. Since the project is huge, we cannot do the export page by page. Is there an easy way to do this? Also, we want to include the attachments in the export. These exports will later be stored in service now knowledge base. How can we achieve this ?

1 answer

0 votes
Piyush Annadate
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 14, 2022

Hi,

Requirement: Python OR Shell Scripts (curl)

 

Process:

Fetch all the pages id using GET - https://<URL>/wiki/rest/api/space/<space key>/content?start=0&limit=9999&type=page

 

Now using scripts - iterate the page id for the below and save the output with the page name from the above

GET at https://<URL>/wiki/exportword?pageId=<page id>

 

:) - Probably save the list of page id and names in an CSV and iterate that CSV as curl to save the output which would be word file.

 

Notes on Word exporting

  • Only the first 50 images attached to the page are exported to your Word document.

 

PS: You might need to do some checks in the scripting (shell would be easy) an can be run from the system with internet.

Hi Piyush,

Thanks for the response and sharing related links. I see this works if the page has an image. what about other attachments for ex: csv, docx that are attached to a page? Is there an easy way to download all these attachments?

Or do we have to iterate through the API as mentioned in this article and download all the attachments? - somehow we are unable to download attachments using the API mentioned in this article.

Regards

Ram

Like Piyush Annadate likes this

We are able to download all the attachments of a page using below API

https://<url>/wiki/download/all_attachments?pageId=<pageid> 
Like Conrado Maggi likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events