plecode.blogg.se

How to use confluence sdk
How to use confluence sdk







We used the search REST API to determine if a page with our generated title is already in Confluence. If it does, then we can just update the page if the content of the body is different. Since Ansible should be idempotent, we decided to have a check to determine if the Confluence page already exists. Great, now we have the body that we can put into a jinja2 template. Make sure to grab the value of the body where representation equals storage. Making the GET request on the following URL will provide the HTML storage format that you can use to create or update a page later. The tricky part is knowing how to format the HTML body of the page in your request however you can use the Confluence web editor to format a template then grab the body from there. Using the Confluence REST API to create and update pages is fairly simple. If you missed the first part, please check it out here. In part two of this tutorial we'll be going over how we upload the exercise content to Confluence.









How to use confluence sdk