I’m trying to update a page on confluence.
Reading its content works fine, but updating gives 405 error “The specified HTTP method is not allowed for the requested resource”
Here is my code:
import requests
import json
auth=('<name>', 'pwd')
url_base = 'https://confluence-eng-rtp2.cisco.com'
url = url_base + '/conf/rest/api/content'
data1= \
{ 'body': {
'view': {
'value': '<p><b>A sample</b> Wiki page</p><p>Line2 going to '
'version 4</p><p>End</p>'}},
'version': {
'number': 3,
'when': '2017-10-06T15:16:17.501-04:00'}}
headers = {'Content-Type': 'application/json'}
requests.put(url, data = json.dumps(data1), auth=auth, headers=headers)
Please help