-
Bug
-
Resolution: Fixed
-
Low
-
None
-
1
-
Severity 3 - Minor
-
Issue Summary
Copying a page via API is an awesome way to automate some of our daily tasks! It seems that sometimes when we need to copy a page but change its body, the endpoint does not respect our changes and just copy the content from the original page.
Steps to Reproduce
- Create a page with some text content;
- Use the copy page API to copy the page you created (change some of the fields from the below curl and run it on a terminal):
Unable to find source-code formatter for language: curl. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
curl --request POST \ --url 'https://<SITE_NAME>.atlassian.net/wiki/rest/api/content/<CONTENT_ID>/copy' \ --user '<EMAIL:API_TOKEN>' \ --header 'Accept: application/json;charset=UTF-8' \ --header 'Content-Type: application/json' \ --data '{ "destination": { "type": "parent_page", "value": "<CONTENT_ID>" }, "pageTitle": "Page copied via API", "body": { "storage": { "value": "This text should appear in the new copied page instead of the same content the original page has", "representation": "storage" } } }'
Expected Results
Even copying the page, the body of the page should be changed to what we set in the body parameter.
Actual Results
The page is just copied with no changes.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- is duplicated by
-
CONFCLOUD-71292 Copy single page API with custom body does not work anymore
- Closed
- relates to
-
CONFCLOUD-70325 Can't publish edits to pages copied with the API
- Closed