- Getting task lists
- Getting a task list
- Creating a task list
- Updating a task list
- Changing the order of task lists
- Changing the order of tasks
- Deleting a task list
- The task list object
- Dependent objects
You can list task lists by making a GET request to:
/api/tasklists
for a list of all task lists from all projects/api/tasklists?where=project_id=[PROJECT_ID]
for a list of task lists from a project/api/tasklists?where=milestone_id=[MILESTONE_ID]
for a list of task lists linked with a milestone
Example of response:
{
"tasklists": [
{
"id": 499,
"name": "Design",
"project_id": 1,
"seq": 1,
"milestone_id": 3,
"created_on": "2013-06-26T12:07:44Z",
"updated_on": "2014-07-23T14:22:05Z"
},
{
"id": 518,
"name": "Coding",
"project_id": 1,
"seq": 2,
"milestone_id": null,
"created_on": "2013-06-26T12:07:44Z",
"updated_on": "2014-07-23T14:22:05Z"
}
]
}
You can also include related content when listing task lists.
To get the task list info, make a GET request to:
/api/tasklists/[TASKLIST_ID]
Example response:
{
"tasklists": [
{
"id": 499,
"name": "Design",
"project_id": 1,
"seq": 1,
"milestone_id": 3,
"created_on": "2013-06-26T12:07:44Z",
"updated_on": "2014-07-23T14:22:05Z"
}
]
}
You can also include related content when getting a task list.
To create a task list, make a POST request to:
/api/tasklists
with the request body containing the new task list info, as in the example below:
{
"name": "Website Design",
"project_id": 100
}
If successful, the response will return 201 Created
. The response header Location
will contain a link for the new task list. The response body will contain the new task list info as in the Getting a task list section.
When creating a task list: name
, project_id
.
To update an existing task list, make a POST or PUT request to:
/api/tasklists/[TASKLIST_ID]
with the request body containing the updated info. You can send only the changed fields.
Example of request body if you want to change the tasklist name:
{
"name": "Urgent tasks"
}
The response will return 200 OK
and will contain the updated task list info as in the Getting a task list section.
To reorder the task lists in a project you need to make an update project request with a body similar to:
{
"tasklists_order": [ 493, 50, 128, 2, 4 ]
}
where tasklists_order
is a list of task list ids in the new order.
To reorder the tasks in a task list you need to make an update task list request with a body similar to:
{
"tasks_order": [ 39, 2, 10, 9, 11, 12, 209 ]
}
where tasks_order
is a list of task ids in the new order.
Note: The order of tasks is defined per task list, not per project.
To delete a task list, make a DELETE request to:
/api/tasklists/[TASKLIST_ID]
If successful, the response will have a 200 OK
status code.
**Deleting a task list will also delete all other data from that tasklist: tasks and time entries!
A task list object has the following attributes:
Attribute | Type | Description |
---|---|---|
id | integer | (read-only) Unique task list identifier |
name | text | Task list name |
seq | integer | Position (order) of the task list in the project |
project_id | integer | (read-only) Project id |
milestone_id | integer | Id of the milestone it is linked with. If a task list is linked with a milestone, all tasks from the task list should be completed by the milestone due date. |
created_on | datetime | (read-only) Date and time when the list was created |
updated_on | datetime | (read-only) Date and time when the list was last updated |
The following object types can be used in includes:
Object type | Include key | Relationship |
---|---|---|
Project | project | parent |
Milestone | milestone | parent |
Task | tasks | child |