Skip to main content

 Web service API

How to use PageSeeder's Web service API

find tasks public

/tasks/find [GET]

com.pageseeder.comment.GetTasksByFilter

Description

Load public tasks by filter.

Load a list of non-archived tasks using filter parameters. The last comment in the task must match all filter parameters. The tasks with the most recent last comment are returned first.

The @status, @priority, @due attributes and <assignedto> element might not be included if comments=first or none and the last comment in the task is not loaded.

Parameters

NameDescriptionRequiredTypeDefault value
assignedafterThe date time after which the tasks were assigned last, format is ISO-8601 e.g. 2010-10-25T12:26:00+10:00nostring
assignedbeforeThe date time before which the tasks were assigned last, format is ISO-8601 e.g. 2011-08-25T10:20:00-04:00nostring
assignedtoThe ID of the member the tasks are assigned to (0 means Nobody).nolong
attachmentsThe attachments to include (can be none, context, all)noenumall
authorThe ID of the tasks authornolong
commentsWhich comments should be loaded for each task (can be: none, first, last, all, archive)noenumlast
contentsThe contents to include (can be none, all)noenumall
contentroleThe contentrole for the tasks, can be comment, workflow, all (comment includes file attachment)noenumall
contextThe context for the tasks (can be group, uri, all)noenumall
createdafterThe date time after which the tasks were created, format is ISO-8601 e.g. 2010-10-25T12:26:00+10:00nostring
createdbeforeThe date time before which the tasks were created, format is ISO-8601 e.g. 2011-08-25T10:20:00-04:00nostring
dueafterThe date time after which the tasks are due, format is ISO-8601 e.g. 2010-10-25T12:26:00+10:00nostring
duebeforeThe date time before which the tasks are due, format is ISO-8601 e.g. 2011-08-25T10:20:00-04:00nostring
emailsThe email addresses to include, can be none, all (admin only)noenumnone
groupsComma-separated list of groups the tasks must belong to (if not specified, the user’s current groups are used)nostring
labelsComma-separated list of label value – task MUST have all (not recommended for filtering large data sets)nostring
modifiedafterThe date time after which the tasks were modified, format is ISO-8601 e.g. 2010-10-25T12:26:00+10:00nostring
pageThe page to loadnointeger1
pagesizeThe number of results per pagenointeger1000
pathsThe context URI paths for the tasks – MUST be URL encoded (comma-separated list with optional * suffix)nostring
prioritiesComma-separated list of prioritiesnostring
publicationid
Return only tasks for documents in this publication. Requires PageSeeder 5.9907 or higher.nopublicationid
statusesComma-separated list of statusesnostring
tasksizeThe maximum number of comments to return per tasknointeger100
titleThe title of the tasks (optional wildcard * suffix, use ** to escape)nostring
typeThe type of the tasks (optional wildcard * suffix, use ** to escape).nostring
typesComma-separated list of types the task can have (empty string means no type)nostrings

Permission

This service can only list tasks based on the groups that user have access. If the group is public, anyone can access it.

If the parameter emails is set to all, the permission is restricted to administrator only.

Response

The output has the following format:

<tasks>
  <task id="123"
        title="My thread"
        lastcommentid="234"
        lastcommentdate="2012-08-20T14:27:48+10:00"
        status="Open"
        priority="High"
        due="2012-08-25T18:00:00+10:00">
    <uri id="789"> ... </uri>
    <locator fragment="2"/>
    <assignedto id="34" date="2012-08-20T14:27:48+10:00" ...>
      ...
    </assignedto>
    <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>
    </comment>
  </task>
  <task id="100"> ... </task>
</tasks>

Error Handling

CodeCause / Description
0x1306The Group is invalid or not accessible
0x1312The createdafter or createdbefore date is invalid
0x1313The author is invalid
Created on , last edited on