Web service API

How to use PageSeeder's Web service API

get task public

/tasks/{taskid} [GET]

com.pageseeder.comment.GetDiscussion

Description

Load a public task

Load a single task from accessible groups.

Note

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

Parameters

NameDescriptionRequiredTypeDefault value
commentsthe comments to include, can be "none","first","last","all","archive"nostringall
returngroupsThe groups to return in the output, can be "none","user" or "all". Only administrator, will include all comments.nostringnone
discussionsizeThe maximum number of comments to return per discussionnolong1000

 

Permission

Undocumented permissions requirements.

Response

When the <task> exits, the return has the following format:

<task id="332" 
   title="Task 3" 
   replycount="0" 
   lastcommentid="333" 
   lastcommentdate="2017-02-23T15:09:55+11:00" 
   status="Open"
   priority="Low" 
   due="2017-02-23T17:00:00+11:00">
   <group id="8" ... common="false"/>
   <assignedto id="1" 
      firstname="firstName" \
      surname="surName" 
      username="userName" 
      status="activated"
      date="2017-02-23T15:09:11+11:00">
      <fullname>fullName</fullname>
   </assignedto>
   <comment id="332" 
      contentrole="Comment" 
      created="2017-02-23T15:09:11+11:00" 
      status="Open"
      priority="Low" 
      due="2017-02-23T17:00:00+11:00">
      <title>Task 3</title>
      <author id="1" 
         firstname="firstName" 
         surname="surName" 
         username="userName" 
         status="activated">
         <fullname>fullName</fullname>
       </author>
       <assignedto id="1"> 
          <fullname>fullName</fullname>
       </assignedto>
       <content type="text/plain">Task3</content>
   </comment>
   <comment id="333" ...> 
        ...
   </comment>
...
</task>

 

Effect of comments parameter

If comments is "none":

<task id="332" title="Task 3">
    <group id="8" 
    name="pub-a" 
    description="A sample public group" 
    owner="pub" 
    access="public"
    common="false"/>
</task>

If comments is "first":

<task id="332"
   title="Task 3"
   replycount="0"
   lastcommentid="333"
   lastcommentdate="2017-02-23T15:09:55+11:00"
   status="Open"
   priority="Low"
   due="2017-02-23T17:00:00+11:00">
   <group id="8" ... common="false"/>
   <assignedto id="1"
      firstname="firstName" \
      surname="surName"
      username="userName"
      status="activated"
      date="2017-02-23T15:09:11+11:00">
      <fullname>fullName</fullname>
   </assignedto>
   <comment id="332"
      contentrole="Comment"
      created="2017-02-23T15:09:11+11:00"
      status="Open"
      priority="Low"
      due="2017-02-23T17:00:00+11:00">
      <title>Task 3</title>
      <author id="1"
         firstname="firstName"
         surname="surName"
         username="userName"
         status="activated">
         <fullname>fullName</fullname>
       </author>
       <assignedto id="1">
          <fullname>fullName</fullname>
       </assignedto>
       <content type="text/plain">Task3</content>
   </comment>
</task>

If comments is "last":

<task id="332"
   title="Task 3"
   replycount="0"
   lastcommentid="333"
   lastcommentdate="2017-02-23T15:09:55+11:00"
   status="Open"
   priority="Low"
   due="2017-02-23T17:00:00+11:00">
   <group id="8" ... common="false"/>
   <assignedto id="1"
      firstname="firstName" \
      surname="surName"
      username="userName"
      status="activated"
      date="2017-02-23T15:09:11+11:00">
      <fullname>fullName</fullname>
   </assignedto>
   <comment id="333" 
      contentrole="Comment" 
      created="2017-02-23T15:09:55+11:00" 
      status="Open" priority="Low" 
      due="2017-02-23T17:00:00+11:00">
      <title>Task 3</title>
      <author id="1" ... > ... </author>
      <assignedto id="1" ... > ... </assignedto>
      <content type="text/plain">fdfsdfsdfsdsf</content>
    </comment>
</task>

If comments is "archive":

<task id="332"
   title="Task 3"
   replycount="0"
   lastcommentid="333"
   lastcommentdate="2017-02-23T15:09:55+11:00"
   status="Open"
   priority="Low"
   due="2017-02-23T17:00:00+11:00">
   <group id="8" ... common="false"/>
   <assignedto id="1"
      firstname="firstName" \
      surname="surName"
      username="userName"
      status="activated"
      date="2017-02-23T15:09:11+11:00">
      <fullname>fullName</fullname>
   </assignedto>
   <comment id="332" ... > ...  </comment>
   <comment id="333" ...>  ...  </comment>
   <comment id="353" 
      contentrole="archive-Comment" 
      created="2017-02-24T14:56:11+11:00" 
      status="Open" 
      priority="Low"
      due="2017-02-23T17:00:00+11:00">
      <title>Task 3</title>
      <author id="1" ... > ...</author>
      <modifiedby id="1" ... > ... </modifiedby>
      <assignedto id="1" ... > ... </assignedto>
      <content type="text/plain">Example3</content>
    </comment>
</task>

Error handling

CodeCause / Description
0x1316 the discussion was not found

Created on , last edited on