Can we write content from a XML document into a Confluence page using Confluence Rest API

M Homeswara Reddy April 20, 2021

Can we write content from a XML document into a Confluence page using Confluence Rest API?

We want to import Documents into Confluence. But we are not satisfied with the output of the "Import Word Document" Functionality. So, we are thinking of Converting the Word Doc to XML and then reading content from XML Document to Already created Confluence Page.

Is there any way we can read data from XML Document and write it to the Confluence Page 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2021

Yes, but it's an admin action and not yet realised in the REST API.

It's also going to be a lot of work - the only XML you can import into Confluence is a Confluence space export to XML.  You would need to convert your document into XML that Confluence would generate if you exported it, wrapped in a space, then you can import the space, and move the pages to where you want them.

I think you might be better off looking at what you are not satisfied with on the import word functions - it's probably going to be better to edit the word doc a little so that it can be imported in a way you want.  What is currently wrong with your import?

M Homeswara Reddy April 20, 2021

Yes, we have Converted the Word doc to XML File.

Do we need to Write any programming Language to write content from a XML document into a Confluence page using Confluence Rest API

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2021

> Yes, we have Converted the Word doc to XML File.

So you've converted it to Confluence space xml ready for import?  (Not just xml, but xml suitable for import?)

>Do we need to Write any programming Language to write content from a XML document into a Confluence page using Confluence Rest API

No, as I said, there is no REST call that can do space imports

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events