Is it possible to add to the confluence page using the API? It seems that it can be updated with the API, but it seems that the update must be updated by specifying the one to be added and the existing one. If you specify only the one to be added in the API update, the existing one will be deleted.
"Adding to a page" is "updating a page". It does not delete anything, it adds a new version of the page with the new content.
I received an answer, but the question is how to add to an existing page. I think that it will be overwritten by the update and the existing part will disappear, but are there any options etc. that are not deleted?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure what you are trying to do here.
Adding to a page IS an update. Add and edit are the same process. Just because you are not removing anything when you add to a page does not mean there is a different action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using the update API, it looks like this: There are two tables on the page, but the value of test1 in table1 If you update to 777, it will be updated, but the existing table2 will disappear. It seems to be overwritten. Also, for example, even if table3 is added It will be overwritten and will be the same.
Before use: Page content
table1
test1 123
test2 456
table2
test3 abc
test4 efg
After use: Page content
table1
test1 777
test2 456
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, your edit is deleting the original content. To add to the page, add your content, don't delete.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You get the content of the page, and update it with your new data. That's what an edit or update is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @青山 明
Here's an API example on how to create a new page
https://developer.atlassian.com/cloud/confluence/rest-api-examples/#create-a-new-page
And here's an example of how to update the existing page
https://developer.atlassian.com/cloud/confluence/rest-api-examples/#update-a-page
Remember when updating you need to know the ID of the page
Let me know if you have any queries
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Follow the example @青山 明
You need to follow these steps in order to update the existing page
Make a GET call to get the page information
Also get the storage format of page which is given in the example
Now format the API to include old data and add the new content which you need to update and make a PUT call
That's it
Let me know if you have any queries
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I get the storage format of the page property macro, the data contains double quotes and needs to be escaped. Is there any good way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.