Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create a set of pages automatically ?

Jason Pepper August 14, 2012

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
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2012

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.

Jason Pepper August 15, 2012

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 :-)

Jason Pepper August 15, 2012

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 :-(

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2012

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.

Jason Pepper August 15, 2012

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

RianA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2012

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!

Jason Pepper August 15, 2012

Figured it out !

--service is your friend ;-)

Thanks Bob - your CLI rocks again !

Jason Pepper August 15, 2012

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

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2012

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.

0 votes
JohnA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2012

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

0 votes
Alejandro Conde Carrillo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events