Hi,
I want to create a confluence page using a user defined template via rest api call.
I have tried the following methods
curl -u username:api_token -X POST -H 'Content-Type: application/json' https://xxxxxxx/wiki/spaces?{space_name}/pages/createpage-entervariables.action?templateId=tempalte_id&spaceKey=space_key&title=Test_Release_automation2&newSpaceKey=space_key&fromPageId=parent_page_id
but the page is not getting created
I have also tried,
curl -u username:api_token -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"Test_release_automation3","ancestors":[{"id":parent_page_id}],"space":{"key":"space_key"},"templateId":template_id,"body":{"storage":{"value":"","representation":"storage"}}}' https://xxxxxx/wiki/rest/api/content/ | python3 -mjson.tool
using this method I am able to create the page but the specified template is not getting used. The created page is blank.
I would like to know what i am doing wrong in both cases.
Also i want to know that is there any other way to create a confluence page using a template via api call.
Thanks
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.