How to create page based on an existing template with rest api or using atlassian-python-api?

Mark March 28, 2021
What method should I use and where to find a data structure for such a request?

I have an idea to form html in the request body, but it doesn't seem like a good idea

My template looks like this

image.png

 

1 answer

0 votes
Vitor LC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2021

Hi,

First of all I have to warn you that the solution below is for Confluence server. I don't know if it works for Confluence Cloud.

To create a page based in a template you can use the following URL a:

https://your_confluence_server/confluence_site_name/pages/createpage-entervariables.action?templateId=template_page_id&spaceKey=template_space_key&title=page_title&newSpaceKey=space_key_where_page_is_created&fromPageId=parent_page_id.

You can replace the full parameter title=page_title by only title if the page title is saved with the page (this is the default).

If the space is the same as the one where you have the template you can omit the parameter newSpaceKey

You can also omit the parameter fromPageId if the page you are creating is a child of the page where are currently located.

Hope it helps,

Vitor

Khai Shaun Ng August 4, 2023

Unfortunately this doesn't work for Confluence Cloud

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events