Skip to main content

 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.

The attributes – @status, @priority, and @due – and element <assignedto> are not included when  the value for @comments is 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, archivenostringall
returngroupsThe groups to return in the output, can be none, user or all (administrator only  includes all comments)nostringnone
discussionsizeThe maximum number of comments to return per discussionnolong1000

Permission

This service is public, anyone can invoke it but the task must be in a public group.

Response

When the <task> exists, the response 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>A complete name</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>A complete name</fullname>
    </author>
    <assignedto id="1">
      <fullname>A complete name</fullname>
    </assignedto>
    <content type="text/plain">Task3</content>
  </comment>
  <comment id="333" ...> ... </comment>
  ...
</task>

Effect of comments parameter

If the value of comments is none, the response is:

<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 the value of comments is first, the response is:

<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>A complete name</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>A complete name</fullname>
    </author>
    <assignedto id="1">          
      <fullname>A complete name</fullname>
    </assignedto>
    <content type="text/plain">Task3</content>
  </comment>
</task>

If the value of comments is last, the response is:

<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>A complete name</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">some text</content>
  </comment>
</task>

If the value of comments is archive, the response is:

<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>A complete name</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
0x1325the task was not found
Created on , last edited on