Discussion message collection
The discussion message Collection is used to add new discussion messages to a space and retrieve existing messages.
Listing messages in a collection
To retrieve a list of discussion messages, do a GET method request to the Collection URL.
Messages are returned in the order that they were published. The collection supports paging and returns first, last, next and previous links.
By default only the headlines of messages are returned in the collection and a separate request must be made to retrieve the full content of an entry.
Retrieving an individual message
You can retrieve the Atom entry for an individual discussion message using the URLs returned from the collection. These will be the same as those in the web interface with +atom appended. Threading is supported using the <thr:in-reply-to> element from the Atom Threading Extensions.
Adding a new message
A new discussion message is submitted using a POST method request to the collection URL.
Content
Content for a message is supplied in the <content> element. This can have a type of either text, html or xhtml. If text is used then the simple markup rules are used to generate the HTML version. Note that it is not possible at present to add attachments over the APP interface.
Threading
Threading is supported using the Atom Threading Extensions. To add a discussion message in response to an existing discussion message specify the http://purl.org/syndication/thread/1.0 namespace and then use a <thr:in-reply-to> element with the ref attribute set to the <id> of the parent message.
Drafts
If the <app:draft> element is set to indicate that this is a draft then the message will not be published and instead stored in the Taskbox.
Response code
When a discussion message is successfully created using the API a response code of 201 will be given and the location of the new tagged page sent back in the Location: header. Note that if the message is subject to workflow then it may not be possible to retrieve it at that location until it has been approved.
Updating an existing message
It is not currently possible to update an existing discussion message as the system does not support editing of published messages. This is a deliberate decision in the design of the system due to its interoperation with e-mail where obviously deleting Internet e-mail messages is not possible.
Deletion
To withdraw a discussion message do a DELETE request on its URL. It is not currently possible to reinstate a discussion message over APP.
If a discussion message is still at draft status then a DELETE request will instead delete it entirely.







Digg
reddit
Google Bookmarks
Yahoo! My Web
del.icio.us
StumbleUpon
Newsvine
livejournal
Facebook
BlinkList