When using the update_or_create method for an existing page I am getting a 501 server error. This can be resolved by logging into confluence and visiting the page before updating. Seems to be related to the following bug, which has a code based solution.
https://community.atlassian.com/t5/Atlassian-Cloud-Migration/REST-API-returns-501-Not-Implemented-Error-Until-Page-is-Visited/qaq-p/1703504