If you already have a wiki page you can edit it content (body) by sending a request to the wiki page feed. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery. Also, I explain some important elements that are not mentioned in the official documentation.
IBM Connections 4.5 documentation:
- Retrieve the existing wiki page Atom document. See Retrieving a wiki page for more details.
- Edit the wiki page Atom document to include the information you want to change.
- Send the updated Atom document using the following request...
But in the second step, Edit the wiki page Atom document to include the information you want to change, a lot of info is missed, as example, it doesn´t explain that if you want to update the content of a wiki page (body), in the entry atom the content inside the tag <content type="text/html"></content> MUST be inside "<![CDATA[" "]]>", example:
Also, Connections API returns a status code: 200 OK event if the content inside the tag <content type="text/html"></content> is NOT valid, in that case the body of wiki page will be updated empty, also, only one <div></div> tag is allowed at the top level of the body, you can´t add something like <div>Hello Word</div><div>More Content</div> in that case the <content type="text/html"></content> in the entry atom should look like:
Atom API Request Details
|Response||Status Code: 200 OK|
Example of a valid entry atom
Example using jQuery
Note: console.log can throw errors in IE, they are there for illustrative purposes only and should be changed as required.