---
title: "Service: /tasks/{taskid} [GET]"
source: https://dev.pageseeder.com/api/services/get-task-public_get.html
description: "Retrieves a single public task by ID with configurable comment inclusion. Returns task details including status, priority, assignment, and comments based on specified parameters. Requires task to be in a public group."
last_updated: 2026-09-08T11:52:03+10:00
document_type: api_endpoint
operation_id: comment-GET
resource_id: comment
path_template: /tasks/{taskid}
http_method: GET
api_category: comment
implementation_version: 6.2004
api_since: 5.1102
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: null
generated_at: 2026-09-02
tokens: ~1449
---

# /tasks/\{taskid\} \[GET\]

## Description

Load a public [task](../../reference/glossary/task.md).

Load a single task from accessible groups.

> **Note:** 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

| 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:

```xml

<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:

```xml

<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:

```xml

<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:

```xml

<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:

```xml

<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 |

