get task public
/tasks/{taskid} [GET]
| API Support | Available since | Last updated | Output |
|---|---|---|---|
| 5.1102 | 5.9500 | xml, json |
Description
Load a public task.
Load a single task from accessible groups.
@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
| Name | Description | Required | Type | Default |
|---|---|---|---|---|
| comments | The comments to include, can be none, first, last, all, archive | no | string | all |
| returngroups | The groups to return in the output, can be none, user or all (administrator only includes all comments) | no | string | none |
| discussionsize | The maximum number of comments to return per discussion | no | long | 1000 |
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
| Code | Cause / Description |
|---|---|
| 0x1325 | the task was not found |