Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

creating confluence pages programmatically

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?

1 answer

0 votes

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

🥓🙅🏻‍♀️ Meet-less May Badge!

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...

202 views 2 13
Read article

Community Events

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

Events near you