How to Import Word Doc into Confluence via API

Areeba Moin March 3, 2024

I am on Data Center version of Confluence and trying to find the API method for importing Word Doc into Confluence page using a Python script.

I found a related link (https://community.atlassian.com/t5/Confluence-questions/Importing-a-word-doc-using-python-API/qaq-p/2312183) which talks about using this Create Page API . But this link talks only about creating a Page and I couldn't find any parameter details around import a Word Doc into the created page.

Can I please get some help around this?

Thanks.

1 answer

1 vote
Andrii Maliuta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2024

Hello @Areeba Moin ,

As I know, there is no direct REST API method to import MS Word documents into Confluence, only possible via the UI.

As you use Python, as an option it should be possible to use the Python APIs to extract the content from the Word document into text or HTML format and then use CREATE page

https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-wiki-rest-api-content-post  REST API to pass this extracted data as a request body. So with this HTML you will form the new page body as you need.

Areeba Moin March 4, 2024

Thank you Andrii.

Like Andrii Maliuta likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events