Update Confluence page automatically

Hi,

My script generates a csv file in format say:

project1,owner1,details1

project2,owner2,details2

 

How do I update a confluence page using rest api's commands with this data? Preferably, I would like to use a bob swift cvs table on my confluence page and update the cvs data using the rest api command.

Suggestions please.

 

Thanks

 

 

1 answer

1 accepted

Unless you want to do the programming yourself, it would be much easier to use the Confluence Command Line Interface (CLI) to upload the file in wiki format. Especially easy if your CSV is in a file:

--action storePage --space XXX --title "My page" --content "{csv}" --file myFile.csv --content2 "{csv}"

The file content is included after content and before content2.

An alternative is to use addAttachment to add the file as an attachment and store the page with the wiki markup for the csv macro that accesses the csv from an attachment. 

Make sure your script is producing valid CSV as defined in the reference on CSV Macro.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,026 views 2 13
Read article

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