I need to create a large amount of confluence pages, which describe an api (dozens of services and hundreds of pages). Trying to do this by hand makes me crazy.
I want to implement a script which would do it for automatically. The script would fetch a domain model for services, create appropriate markup and post it using confluence rest api.
As far as I understood, confluence uses custom markup for page content. Certainly, I could create a template for each element like paragraph or table und render markup based on my teamplates. But instead I would rather like to use an Java api for its creation.
Does something similar exist?
Using a Java for this would probably be way too much for what you're trying to achieve.
There are 2 ways you can do this, one would be to use a template, where you can have fields that populate the data or create pages with a REST call.
For creating a template, you'd follow the steps here
And for creating pages with a REST call, which I think would be better for you since it sounds like you have complex pages with content that already exists somewhere, try this document as a start
Remember you need to use the XHTML markup to create the pages. So, I'd suggest creating an example page and then go to ... > View Storage Format to see what it looks like, and then use that to create the page you want with the REST call.
Hope this helps.
Hello Confluence Community! What if i told you that you could have a healthier life and be 100% meet-less? This month, we're promoting a healthy, balanced work diet with Confluence. We la...
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