GET/tasks/{id}.json

Retrieve a Task

Get a Task

  • When you get a single task the responsible-party-ids is only returned if the task is assigned to one or more people. If it is not returned then the task is considered assigned to Anyone.

  • Private will return a 0, 1 or 2. An open task will be '0', A private task will be '1' and a task which is in a private list will be a '2' as it will inherit the privacy from the parent task list (or parent task)

  • If a Task is already completed, the following fields will also be visible:

    • "status":"completed",
    • "completed":true,
    • "completed_on":"2017-04-20T12:50:19Z"

Path Params

  • Name
    id
    Type
    string
    required
    Description

Query Params

  • Name
    getFiles
    Type
    boolean
    Description

    Files attached to tasks can be returned within the task object by setting this parameter to true.

    Default
    false
  • Name
    nestSubTasks
    Type
    boolean
    Description

    Sub tasks can be nested within each returned task object by setting this parameter to true.

    Default
    false
  • Name
    includeCompletedSubtasks
    Type
    boolean
    Description

    Used in conjunction with nestSubTasks, this parameter can be used to include completed subtasks by setting it to true.

    Default
    false

Request Examples

Example Request

GET
/tasks/{id}.json
curl --request GET \
     --url https://{site_name}.teamwork.com/stats.json

Responses

  • Code
    200
    Type
    object
    Schema
    Description
    200 Response

Examples

200 Response

application/json
{
  "STATUS": "OK",
  "todo-item": {
    "id": 1,
    "canComplete": true,
    "comments-count": 0,
    "description": "Hi Holly,\n\nPlease look at requirements for main landing page.",
    "has-reminders": false,
    "has-unread-comments": false,
    "private": 0,
    "content": "Illustration for landing page",
    "order": 2001,
    "project-id": 1,
    "project-name": "Website Redesign",
    "todo-list-id": 1,
    "todo-list-name": "Design Requirements",
    "tasklist-private": false,
    "tasklist-isTemplate": false,
    "status": "new",
    "company-name": "[9999] Holly's Web Agency",
    "company-id": 1,
    "creator-id": 1,
    "creator-firstname": "Holly",
    "creator-lastname": "Bracken",
    "updater-id": 0,
    "updater-firstname": "",
    "updater-lastname": "",
    "completed": false,
    "start-date": "",
    "due-date-base": "20200430",
    "due-date": "20200430",
    "created-on": "2020-04-28T16:31:24Z",
    "last-changed-on": "2020-04-28T16:31:24Z",
    "position": 2001,
    "estimated-minutes": 240,
    "priority": "medium",
    "progress": 10,
    "harvest-enabled": false,
    "parentTaskId": "",
    "lockdownId": "",
    "tasklist-lockdownId": "",
    "has-dependencies": 0,
    "has-predecessors": 0,
    "hasTickets": false,
    "tags": [
      {
        "id": 1,
        "name": "design",
        "color": "#37ced0",
        "projectId": 0
      }
    ],
    "timeIsLogged": "0",
    "attachments-count": 0,
    "responsible-party-ids": "1",
    "responsible-party-id": "1",
    "responsible-party-names": "Holly O'Driscoll",
    "responsible-party-type": "Person",
    "responsible-party-firstname": "Holly",
    "responsible-party-lastname": "O'Driscoll",
    "responsible-party-summary": "Holly O'Driscoll",
    "predecessors": [],
    "canEdit": true,
    "viewEstimatedTime": true,
    "creator-avatar-url": "",
    "canLogTime": true,
    "commentFollowerSummary": "Holly O'Driscoll",
    "changeFollowerSummary": "Holly O'Driscoll",
    "commentFollowerIds": "1",
    "changeFollowerIds": "1",
    "userFollowingComments": false,
    "userFollowingChanges": false,
    "DLM": 0
  }
}