How-to upload and convert complex word-documents into Confluence via REST API

137 views Asked by At

I have the following problem:

I need to upload a lot of rather complex word files onto our Confluence onPrem via REST-API - but not "just" as attachment - every word document should be a new page - and the content of the word file should be the content of the newly created page.

What do I mean by complex word files: those arenĀ“t just one-liners, those are rich documents, some are rather long, a lot of them have Table-of-contents, Tables, Images, very different ways of formatting within.

What I have managed:

a) Creating a page via REST

b) also uploading an attachment.

From here, I am kinda lost because my confluence-specific knowledge reaches its end and ChatGPT permanently tells me two different things:

a) I previously have to convert the word files into the ADF (Atlassian Document Format) (or:)

b) I previously have to convert the word files into the CSF (Confluence Storage Format)

... to be able to upload them and make them to the page content on-the-fly.

I am not sure what of both is the right document, nor if there is a way to do that converting on the fly, or as bulk.

AND I am not able right now to get a clear answer from chatgpt nor google how - even if I would have the document in the right format, whatever one the "right" one is" - the converting of the attached word file TO THE PAGE CONTENT itself on the fly really works.

So I am kinda lost here, and I would insanely appreciate any help from you guys.

Thanks a lot!

0

There are 0 answers