Trying to make a copy of a single page within the same confluence space using the API as exemplified here.
I'm getting this 404 error:
"null for uri: https://docs.my.company.com/rest/api/content/491102008/copy","status-code":404}'
My python code:
import requests
from requests.auth import HTTPBasicAuth
import json
url = 'https://docs.my.company.com/rest/api/content/491102008/copy'
headers = {'Content-Type': 'application/json',
"Accept": "application/json;charset=UTF-8"}
auth = HTTPBasicAuth('username', 'password')
payload = json.dumps({
"destination": {
"type": "space",
"value": "MYSPACE"
},
})
response = requests.post(url, headers=headers, data=payload, auth=auth)
response.raise_for_status()
return response
I've tried copying many different pages with different ids and a couple different spaces without changing the error.
The URL 'https://docs.my.company.com/rest/api/' has worked for my other API functions, as does my 'headers' and 'auth' parameters.
My company's instance of confluence is version 7.4.3