Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to create multiple pages at once via Confluence Server REST API? Edited

As far as I understand, the Confluence REST APIs work in a linear fashion. You create a page, and then upload attachment to that page, and then create another page. Is there way to create a page with the attachment data?

Also, is there a way to create multiple pages at once?

1 answer

0 votes
Mirek Community Leader May 30, 2021

Basically you need to have a page ID before you upload an attachment. There are different REST API functions that is why it is working like that. 

Here is a nice explanation how this works and on the end you have a example of a script that you can use to create an automation that would fit into your requirements 

https://confluence.atlassian.com/confkb/using-the-confluence-rest-api-to-upload-an-attachment-to-one-or-more-pages-1014274390.html

Hope it helps. 

As for creating multiple pages at once.. I would try with importing a Word document with option "Split by heading" that would create pages base on headings levels. That is a quick and easy way to create a page tree structure. 

@Mirek Thank you. I am aware of the option to import a Word document. The only drawback is we need to clean up pages after importing a doc. That's why we preferred REST APIs since we can upload XHTML content.

As a side note, I know Atlassian products allow WebDav access. However, it does not work properly on Windows 10. If the WebDav access works consistently, I think it is easier and "cheaper" way to update pages and attachments in bulk.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

374 views 2 6
Read article

Community Events

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

Events near you