list group discussions
/groups/{group}/discussions [GET]
API Support | Available since | Last updated | Output |
---|---|---|---|
5.1102 | 5.9907 | xml, json |
Description
Load a list of non-archived discussions from the group specified in the request in reverse chronological order, based on the last comment sent for each discussion.
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
archived | Whether to include discussions/attachedtos where all comments are archived (true if comments=archive ). Requires PageSeeder 5.9907 or higher. | no | boolean | false |
comments | Which comments should be loaded for each discussion | no | enum | all |
page | The page to load | no | long | 1 |
pagesize | The number of results per page | no | long | 10 |
discussionsize | The maximum number of comments to return per discussion | no | long | 100 |
Comments parameter
This parameter controls which comments are loaded in each discussion. It can be one of:
all
– to load all comments in the discussionfirst
– to load the first comment onlylast
– to load the last comment (reply) onlyarchive
– to load all comments including archived onesnone
– no comments
Permission
This service is restricted to guest and higher.
Response
This service returns a <discussions>
element, listing each discussion in a <discussion> element.
<discussions> <discussion id="288" title="original" replycount="3" lastcommentid="292" lastcommentdate="2017-02-22T09:21:48+11:00"> <comment id="288" contentrole="Comment" created="2017-02-21T15:32:35+11:00"> <title>original</title> <author id="1" firstname="John" surname="Smith" username="jsmith" status="activated"> <fullname>John Smith</fullname> </author> <content type="text/plain">Original Document</content> </comment> <comment id="289" contentrole="Comment" created="2017-02-21T15:32:59+11:00"> <title>original</title> <author id="1" ...> ... </author> <content type="text/plain">First Reply</content> </comment> <comment id="290" contentrole="Comment" created="2017-02-21T15:33:07+11:00"> <title>original</title> <author id="1" ...> ... </author> <content type="text/plain">Second Reply</content> </comment> <comment id="292" contentrole="Comment" created="2017-02-22T09:21:48+11:00"> <title>original</title> <author> <fullname>Jane Brown</fullname> </author> <content type="text/plain">TestComment</content> </comment> </discussion> <discussion ...> </discussion> </discussions>
By default, all discussions and comments are included.
Effect of comments
parameter
If comments is first
:
<discussions> <discussion id="288" title="original" lastcommentid="292" lastcommentdate="2017-02-22T09:21:48+11:00"> <comment id="288" contentrole="Comment" created="2017-02-21T15:32:35+11:00"> <title>original</title> <author id="1" ...> ... </author> <content type="text/plain">Original Document</content> </comment> </discussion> <discussion ...> </discussion> </discussions>
If comments is last
:
<discussions> <discussion id="288" title="original" replycount="3" lastcommentid="292" lastcommentdate="2017-02-22T09:21:48+11:00"> <comment id="292" contentrole="Comment" created="2017-02-22T09:21:48+11:00"> <title>original</title> <author> <fullname>Jane Brown</fullname> </author> <content type="text/plain">TestComment</content> </comment> </discussion> <discussion ...> </discussion> </discussions>
If comments is archive
:
<discussions> <discussion id="288" title="original" replycount="3" lastcommentid="292" lastcommentdate="2017-02-22T09:21:48+11:00"> <comment id="288" contentrole="Comment" created="2017-02-21T15:32:35+11:00"> <title>original</title> <author id="1" ...> ... </author> <content type="text/plain">Original Document</content> </comment> <comment id="289"> ... </comment> <comment id="290"> ... </comment> <comment id="291" contentrole="archive-File Attachment" created="2017-02-21T15:34:32+11:00"> <title>original</title> <author> <fullname>Jane Brown</fullname> </author> <modifiedby id="1" firstname="Adriano" surname="Akaishi" username="aakaishi" status="activated" date="2017-02-21T15:35:01+11:00"> <fullname>Adriano Akaishi</fullname> </modifiedby> <content type="text/plain">comment</content> <attachment> <uri id="32" scheme="https" host="www.facebook.com" port="443" path="/" decodedpath="/" external="true" mediatype="" created="2017-02-15T09:51:42+11:00" modified="2017-02-15T09:51:42+11:00"> <displaytitle>https://www.facebook.com/</displaytitle> </uri> </attachment> </comment> </discussion> <discussion ...> </discussion> </discussions>
If comments is none
:
<discussions> <discussion id="288" title="original" lastcommentid="292" lastcommentdate="2017-02-22T09:21:48+11:00"> </discussion> <discussion ...> </discussion> </discussions>
Error Handling
No specific errors expected for this service.