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

generate confluence pages automatically

Bill Wang February 2, 2016

I am working to get the AWS instances resources details and copy&paste to a confluence page. 

Are there any easy way to auto-generate the Wiki documentation from the AWS API?

1 answer

2 votes
Guilherme V.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2016

Hi Bill,

You can create pages with REST API:

You can create a bash(in linux) to auto generate:

for ((i=1;i<=19000;i++)) ; do  curl -v -u admin:admin -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d'{"type":"page","ancestors":[{"type":"page","id":<pageId>}],"title":'$i',"space":{"key":"<space_key>"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' "<confluence-url>/confluence/rest/api/content/?os_authType=basic";  done

information The above script will create 19.000 pages(child pages).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events