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?
Hi Petr,
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.
Thanks, James
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.