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

2 votes
Accepted answer

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 confluence.sh 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 confluence.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?

Cheers!

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.

https://myondemandinstance/wiki/rpc/soap-axis/confluenceservice-v1"

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

Thanks

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,
John

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,056 views 16 14
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