
1- get the page content
2- change/add/modify the content
3- PUT the new content
https://docs.atlassian.com/atlassian-confluence/REST/6.6.0/#content-update
...
!!! change the version number + 1 !!!
PUT /rest/api/content/<id>
"Testing from Atlassian" Kindly ignore this update........
https://jsoneditoronline.org/
Image Removed Image Added |
|
|
Code Block |
---|
title | REQUEST on Windows Powershell |
---|
| curl
-Method PUT
-ContentType 'application/json'
-Body '{"version": {"number": 2},"type":"page","title":"page7",
"space":{"key":"TEST"},"body":{"storage":{"value":"<p>This is a new
page from curl Linux<br/> a new page version2</p>","representation":
"storage"}}}'
https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13140112 |
|
Code Block |
---|
title | PUT HTTP REQUEST |
---|
collapse | true |
---|
| PS C:\Users\jkriker> curl -Method PUT -ContentType 'application/json' -Body '{"version": {"number": 2},"type":"page","title":"page7",
>> "space":{"key":"TEST"},"body":{"storage":{"value":"<p>This is a new page from curl Linux<br/> a new page version2</p>","representation":
>> "storage"}}}' https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13140112
StatusCode : 200
StatusDescription : OK
Content : {"id":"13140112","type":"page","status":"current","title":"page7","space":{"id":13238319,"key":"TEST","name":"test","type":"global","s
tatus":"current","_expandable":{"settings":"/rest/api/space/TEST/s...
RawContent : HTTP/1.1 200 OK
Vary: Accept-Encoding
Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
ATL-TraceId: 4f56ae44c42a17a5
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chu...
Forms : {}
Headers : {[Vary, Accept-Encoding], [Strict-Transport-Security, max-age=315360000; includeSubDomains; preload], [ATL-TraceId,
4f56ae44c42a17a5], [X-XSS-Protection, 1; mode=block]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 4528 |
|
|
|
|
|