Create a stand-alone forum reply programmatically
To post a reply to a topic in a stand-alone forum, send an Atom entry document containing the forum reply to the forum replies resource.See Authenticating requests for information about how to authenticate the request.
Table 1. Atom API request details
Method Resource URI Input representation POST forum replies feed Value of the href attribute of the <link> element with the rel="replies" attribute value in the forum topics feed. forum reply
Input
Provide a forum reply Atom entry document.Note: The content type of the Atom entry document must be application/atom+xml.
Output
An Atom entry document containing the new forum reply.Returned HTTP headers
HTTP/1.1 201 Created
Indicates that the forum reply was successfully created. If an error occurs, this header contains one of the error codes.
Location: url
Link to edit_url of the forum reply. You can use the web address specified here to subsequently retrieve and update the forum reply.
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized
Request:
POST /forums/atom/replies?topicUuid=84139b22-17f0-4290-939b-73370c6ef17c HTTP/1.1 Host: www.dulcinea.com Content-Type: application/atom+xml Authorization: xxx Content-Length: nnn <entry xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns="http://www.w3.org/2005/Atom"> <title type="text">Test reply 1</title> <content type="text">reply test</content> <updated>2010-08-04T13:48:48.622Z</updated> <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="forum-reply"></category> <thr:in-reply-to xmlns:thr="http://purl.org/syndication/thread/1.0" ref="urn:lsid:ibm.com:forum:84139b22-17f0-4290-939b-73370c6ef17c" href="https://www.dulcinea.com/forums/atom/topic?topicUuid=84139b22-17f0-4290-939b-73370c6ef17c"> </thr:in-reply-to> </entry>Response:
HTTP/1.1 201 Created Date: Wed, 04 Aug 2010 21:45:09 GMT Content-Length: nnn Content-Type: application/atom+xml; charset="utf-8" Location: http://www.dulcinea.com/forums/atom/replies <entry xmlns="http://www.w3.org/2005/Atom"> <id>urn:lsid:ibm.com:forum:c8979fef-0be3-4f71-b080-7926aa1c270c</id> <title type="text">Test reply 1</title> <published>2010-08-04T21:45:11.215Z</published> <updated>2010-08-04T21:45:11.215Z</updated> <author> <email>jdoe@literature.com</email> <name>Jane Doe</name> <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> 772A006E-0A01-8703-8525-7346003DAFD6 </snx:userid> <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState> </author> <link href="https://www.dulcinea.com/forums/atom/reply?replyUuid=c8979fef-0be3-4f71-b080-7926aa1c270c" rel="self" type="application/atom+xml"> </link> <link href="https://www.dulcinea.com/forums/atom/reply?replyUuid=c8979fef-0be3-4f71-b080-7926aa1c270c" rel="edit" type="application/atom+xml"> </link> <category term="forum-reply" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category> <link href="https://www.dulcinea.com/forums/html/topic?id= 84139b22-17f0-4290-939b-73370c6ef17c#c8979fef-0be3-4f71-b080-7926aa1c270c" rel="alternate" type="text/html"> </link> <link xmlns:thr="http://purl.org/syndication/thread/1.0" href="https://www.dulcinea.com/forums/atom/replies?replyUuid=c8979fef-0be3-4f71-b080-7926aa1c270c" rel="replies" type="application/atom+xml" thr:count="0"> </link> <thr:in-reply-to xmlns:thr="http://purl.org/syndication/thread/1.0" ref="urn:lsid:ibm.com:forum:84139b22-17f0-4290-939b-73370c6ef17c" href="https://www.dulcinea.com/forums/atom/topics?forumUuid=84139b22-17f0-4290-939b-73370c6ef17c" type="application/atom+xml"> </thr:in-reply-to> <content type="html">reply test</content> <snx:permissions xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> none, create_forum, view_forum, edit_forum, del_forum, create_post, edit_personal_post, edit_all_post, del_personal_post, del_all_post, pin_topic, subscribe, lock_node, add_member, delete_member, create_topictag, del_all_topictag, del_personal_topictag, create_forumtag, del_all_forumtag, del_personal_forumtag, view_category, edit_personal_question, edit_all_question </snx:permissions> </entry>
Parent topic
Work with stand-alone forum repliesRelated reference
Forum reply entry content
});