Updating a community forum topic
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 16, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To update a topic in a community forum, send an updated forum topic document in Atom format to the existing forum topic's edit web address.
Tags: commapi

All existing forum topic information will be replaced with the new data. To avoid deleting all existing data, retrieve any data you want to retain first, and send it back with this request.

Provide a feed link Atom entry document.

  • To pin a topic, add a <category term="pinned" scheme="http://www.ibm.com/xmlns/prod/sn/flags"/> element to the forum topic entry document that you pass in on the request. To remove a pin from a topic, remove the element from the topic entry document.
  • To lock a topic, add a <category term="locked" scheme="http://www.ibm.com/xmlns/prod/sn/flags"/> element to the forum topic entry document that you pass in on the request. To unlock a locked topic, remove the element from the topic entry document.
  • To mark a normal topic as a question, add a <category term="question" scheme="http://www.ibm.com/xmlns/prod/sn/flags"/> element to the forum topic entry document that you pass in on the request. To change a question to a normal topic, remove the element from the topic entry document.

To add an attachment to a topic entry without any, send the modified entry document with an attachment using a multipart PUT request. On a successful PUT, metadata for the attachment will be added to the entry. For example:

<snx:field name="resume" fid="id of the attached file node" ...>

<link href="link to the attachment" />

</snx:field>


To update a topic entry that already has file attachments, send the modified entry document with an attachment using a multipart PUT request. On a successful PUT, metadata for the attachment will be added to the entry. For example:
<snx:field name="resume" fid="id of the attached file node" ...>

<link href="link to the attachment" />

</snx:field>


Any file snx:fields that you want to keep must be present in the entry document. Otherwise, they will be removed from the entry.

To remove an attachment, remove the snx:field for the file from the entry document's metadata, and then send a PUT request.
 

Input
Method URI Description
PUT /forums/atom/topic Value of the href attribute of the <link> element that has a rel="edit" attribute value for each entry in the forum topics feed.
Content Type: application/atom+xml
Name Type Optional Description
topicUuid
string No The UUID of the topic you wish to update.
Output
Code Description
200
OK. Indicates that the forum topic was successfully updated. If an error occurs, this header contains one of the error codes.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
404
Not Found.