Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

antony terrence
Contributor
May 30, 2021

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 Champion
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. 

antony terrence
Contributor
May 30, 2021

@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.

antony terrence
Contributor
May 30, 2021

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
AUG Leaders

Atlassian Community Events