Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rest api "copy a page" does not work, error code 404

Won Key
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2020

restrictions:

curl --request GET --url https://confluence.mydomain.com/rest/api/content/1009950485/restriction/byOperation

{"read":{"operation":"read","restrictions":{"user":{"results":[],"start":0,"limit":200,"size":0},"group":{"results":[],"start":0,"limit":200,"size":0}},"_links":{"self":"https://confluence.mydomain.com/rest/api/content/1009950485/restriction/byOperation/read"},"_expandable":{"content":"/rest/api/content/1009950485"}},

"update":{"operation":"update","restrictions":{"user":{"results":[],"start":0,"limit":200,"size":0},"group":{"results":[],"start":0,"limit":200,"size":0}},"_links":{"self":"https://confluence.mydomain.com/rest/api/content/1009950485/restriction/byOperation/update"},

"_expandable":{"content":"/rest/api/content/1009950485"}},"_links":{"base":"https://confluence.mydomain.com","context":"","self":"https://confluence.mydomain.com/rest/api/content/1009950485/restriction/byOperation"}}

Does it mean no restrictions?

then use curl to copy a page

curl --request POST --url 'https://confluence.mydomain.com/rest/api/content/1009950485/copy' --header 'Accept: application/json;charset=UTF-8' --header 'Content-Type: application/json' --data '{ "copyAttachments": true, "copyPermissions": true, "copyProperties": true, "copyLabels": true, "copyCustomContents": true, "destination": { "type": "space", "value": "Test" }, "pageTitle": "CopyPage", }'  --user username

{"message":"null for uri: https://confluence.mydomain.com/rest/api/content/1009950485/copy","status-code":404}

Copying this page on web is working well.

Any help is appreciated.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events