Create a set of pages automatically ?

Is there a simple way to allow users to create a group of pages in a single click ?

User wants to create a pre-defined set of pages for each new customer page they create..

I guess I'm wanting a page template macro that also creates sub-pages (naming them uniquely as it goes)..

Anyone have any good tips on this ?

3 answers

1 accepted

How to semi-automate repetitive tasks describes how to do this using the run and cli macros.

Oops, this doesn't work with OnDemand because you can't install the plugins. You could use Confluence Command Line Interface on a client machine to do the creates.

Thanks that worked a treat.. I did consider your CLI but I was working under the misaprehension that on-demand didn't allow the remote API, but it's actually enabled by default :-)

Hmm.. I got it working on my local instance but when I run it against my on-demand account I get a problem..

  • My looks like this

java -jar `dirname $0`/lib/confluence-cli-2.6.0.jar --server https://myondmenadurl --user un --password pw "$@"

  • the calling script looks like this

sh --action addPage --space "spacename" --title "Xxxxxx" --parent "Home"

  • and the error I get is

Unable to log in to server: https://myondmenadurl/rpc/soap-axis/confluenceservice-v1 with user: un.

Cause: (503)Service Temporarily Unavailable

The CLI/RPC checkbox in the admin privs is checked..

I was using 2.4.0 of the CLI so switched to 2.6.0 but that has had no effect either..

bit stumped now :-(

Looks fine. Are you sure your instance is available (not down for maintenance or backup)? I access my onDemand instance all the time this way. Take the url listed and paste into the browser and see what you get. If there are problems with that, you will need to talk to Atlassian support.

Thanks for that.. the URL returns a 'down for maintenance' message. I've raised an SR so I guess I'll have to wait for them to come back to me. Thanks for your help so far..

Hi Jason,

Have you tried to use https://myondmenadurl/wiki/rpc/soap-axis/confluenceservice-v1 instead of the previous URL and checked whether it works?


Figured it out !

--service is your friend ;-)

Thanks Bob - your CLI rocks again !

Response from atlassian..

"We have checked that your instance is up. However we noticed something on the URL that you used for request. Could you please try with the following URL instead? Notice the missing wiki that you need to add in order to access your Confluence.


How do I get the "wiki" part of the URL to be produced by CCLI ?


Ah, didn't notice, but for OnDemand, your server address for Confluence needs to have /wiki at the end, otherwise you are trying to talk to JIRA. Just look at the urls for looking at pages - Confluence is a context in the application server.

Probably the API is the best way to achieve that. You will need to call an script to create the pages though.

Hi Jason,

Please accept our apologies for this spam answer that has been left on your question. I have converted it to a comment so that your question still shows up as unanswered and one of our moderators will be along shortly to remove it entirely.

All the best,

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,029 views 51 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you