You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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