To add a topic to a community forum, send an Atom entry document containing the forum topic to the community forum topics resource.
See Authenticating requests
for information about how to authenticate the request.
Table 1. Atom API request details
Community forum topics
Value of the href attribute of the <link> element with the rel="http://www.ibm.com/xmlns/prod/sn/forum-topics" attribute value for each community.
Provide a forum topic Atom entry document.
The content type of the Atom entry document must be application/atom+xml
If you want to add some tags to this topic. For each tag, add the <category term="tag name"/> element to the topic entry document that you pass in on the request.
If you want to create a question instead of a normal topic, add the <category term="question" scheme="http://www.ibm.com/xmlns/prod/sn/flags"/> element to the topic entry document that you pass in on the request.
To create a topic with an attachment, use a multipart post in the request. See Creating a stand-alone forum topic programmatically
for more details.
An Atom entry document containing the new forum topic.
Returned HTTP headers
HTTP/1.1 201 Created
Indicates that the forum topic was successfully created. If an error occurs, this header contains one of the error codes.Location: url
Link to edit_url of the forum topic. You can use the web address specified here to subsequently retrieve and update the forum topic.Error codes
Parent topic: Working with community forum topics
Creating a stand-alone forum topic programmatically
Forum topic entry content
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 No forum exists: This error is generated when the community does not contain a forum. When you create a community, a forum is created for it by default, but the administrator can remove or hide the forum. See Administering Forums for more details.