I am Trying to Create a page in Confluence using Python.
This is the code I am using.
-----------------------------------------------
from atlassian import Confluence
import logging
conf = Confluence(
url='Path_url',
token="PERSONAL_ACCESS_TOKEN"
)
content1 = conf.get_page_by_title(space='SPACE', title='PARENT_PAGE_TITLE', expand="body.storage")
parent_id=conf.get_page_id('SPACE', 'Release PARENT_PAGE_TITLE')
SPAC = conf.get_page_space(parent_id)
status = conf.create_page(
space = SPAC,
title='This is the title',
parent_id=parent_id,
body='This is the body. You can use <strong>HTML tags</strong>!')
print(status)
-----------------------------------------------------------
But, I get an error:
raise HTTPError(error_msg, response=response)
requests.exceptions.HTTPError: Could not create content with type page