Web service API

How to use PageSeeder's Web service API

find comments public

/comments/find [GET]

com.pageseeder.comment.GetCommentsByFilter

Description

Load a list of public comments using filter parameters.

 

Parameters

NameDescriptionRequiredTypeDefault value
groups A comma-separated list of group names the comments must belong to yes strings
archived if "true" include archived comments no boolean false
attachments The attachments to include
(can be "none", "context" or "all")
no enum all
author The member id of the comments author no long
contents The contents to include
(can be "none" or "all")
no enum all
createdafter The date time after which the comments were created e.g. 2010-10-25T12:26:00+10:00 no datetime
createdbefore The date time before which the comments were created e.g. 2011-08-25T10:20:00-04:00 no datetime
labels comma-separated list of labels no string
moderated if "true" include moderated (not accepted) comments no boolean false
page The page to load no long 1
pagesize The number of results per page no  long 1000
paths The context URI paths for the comments - must be URL encoded (comma-separated list with optional * suffix) no paths
position if "first" only search first comment in a discussion (may be faster when using paths) no string any
returngroups The groups to return in the output (can be "none","specified") no enum "none" or if multiple groups "specified"
statuses comma-separated list of statuses no string
title The title the comments must have (optional wild card * suffix, use ** to escape) no string
type The type the comments must have (optional wild card * suffix, use ** to escape) no string

Permission

Undocumented permissions requirements.

Response

This service returns a list of <comment> elements wrapped in a <comments> element as in the example below.

<comments>
   <comment id="234"
            contentrole="File Attachment"
            created="2012-03-08T12:34:00+10:00">
     <title>My thread</title>
     <content type="text/plain">
       Some text
     </content>
     <attachment>
       <uri id="189">...</uri>
     </attachment>
     <attachment fragment="5">
       <uri id="289">...</uri>
     </attachment>
     <context>
       <group id="3"
              name="acme-test" />
     </context>
   </comment>
   <comment id="567">
     ...
     <context fragment="2">
       <uri id="789">...</uri>
     </context>
   </comment>
</comments>

The attachments are only included if the 'attachments' parameter is set to "all".

Error handling

CodeCause / Description
0x1306 The Group is invalid or not accessible
0x1312 The createdafter or createdbefore date is invalid
0x1313 The author is invalid

Created on , last edited on