Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 13 Current »

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

https://developer.atlassian.com/cloud/confluence/rest/#api-content-id-put


!!! change the version number + 1 !!!

PUT /rest/api/content/<id>


"Testing from Atlassian" Kindly ignore this update........


https://jsoneditoronline.org/








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
PUT HTTP REQUEST
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





  • No labels