Web service API

How to use PageSeeder's Web service API

list group discussions

/groups/{group}/discussions [GET]

com.pageseeder.comment.GetDiscussionsForGroup

Description

Load a list of discussions from the group specified in the request.​​​​​

 

Parameters

NameDescriptionRequiredTypeDefault value
commentsWhich comments should be loaded for each discussionnoenumall
pageThe page to loadnolong1
pagesizeThe number of results per pagenolong10
discussionsizeThe maximum number of comments to return per discussionnolong100

Comments parameter

This parameter controls which comments should be loaded in each discussion. It can be one of:

  • all  to load all comments in the discussion
  • first  to load the first comment only
  • last  to load the last comment (reply) only
  • archive  to load all comments including archived ones

Permission

Undocumented permissions requirements.

Response

This service returns a <discussions> element listing each discussion in a <discussion> element.

<discussions>
   <discussion id="288" 
      title="original" 
      replycount="2" 
      lastcommentid="290" 
      lastcommentdate="2017-02-21T15:33:07+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" 
         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>
    </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="290" 
       lastcommentdate="2017-02-21T15:33:07+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>
</discussions>

If comments is "last":

<discussions>
    <discussion 
       id="288" 
       title="original" 
       replycount="2" 
       lastcommentid="290" 
       lastcommentdate="2017-02-21T15:33:07+11:00">
       <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>
    </discussion>
</discussions>

If comments is "archive":

<discussions>
   <discussion id="288" 
      title="original" 
      replycount="2" 
      lastcommentid="290" 
      lastcommentdate="2017-02-21T15:33:07+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>Adriano</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>
</discussions>

 

Error handling

No specific errors expected for this service.

Created on , last edited on