Hi team,
I wanted to edit the page and add some content to the page without deleting/removing the old content which is present on the page using rest API.
Could you please help me to achieve this using REST API?
Thanks,
Naveen
First, you need to get the existing content using the REST API.
More details here:
https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-get
Then you need to append the new content to the end of the page and save it back
More details here:
https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-id-put
Also take a look at this previous question for some more help:
While appending the content to the confluence page using the above REST API URL you have shared, Getting the below error.
{
"data": {
"authorized": false,
"errors": [],
"successful": false,
"valid": true
},
"message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format",
"statusCode": 400
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you already tried the example given in the REST API documentation for confluence cloud ? You can try it first on a sample page to see how it works. If you are facing any issues please post here, will be glad to assist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried that and getting the below error.
{
"data": {
"authorized": false,
"errors": [],
"successful": false,
"valid": true
},
"message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format",
"statusCode": 400
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.