I am trying to create a new page into confluence using Python\'s xmlrpclib. I already know how to update content of an existing page, but how can I create a tot
I dont know Python, but can do this with a REST call:
echo '{"type":"page","ancestors":[{"type":"page","id":'$CONFLUENCE_PARENT_PAGE'}],"title":"'$PAGE_NAME'","space":{"key":"'$CONFLUENCE_SPACE'"},"body":{"storage":{"value":"'$CONTENT'","representation":"storage"}}}' > body.json
curl --globoff --insecure --silent -u ${CONFLUENCE_USER}:${CONFLUENCE_PASSWORD} -X POST -H 'Content-Type: application/json' --data @body.json $CONFLUENCE_REST_API_URL
The confluence rest api url looks something like this: https://confluence.yourdomain.com/rest/api/content/
Basically the answer to your question is you need to send the parent page as an ancestor when creating a brand new page.