Your account must have the "task" classification enabled to view tasks. Administrators can enable this classification using the web interface.
Task Managers can view, create, update and delete tasks associated with their assigned projects (see Project Assignments). Users who are also Project Managers can view, create, update and delete any tasks in your account. Other users can just view tasks associated with their assigned projects.
Tasks associated with time entries can not be deleted. Consider making them inactive instead.
Show
Request
GET /tasks/#{task-id}.xml
Optional parameters
Specify include=projects or include=projects,clients to include related projects or projects and clients. For example:
GET /tasks/#{task-id}.xml?include=projects,clients
Response
Status: 200 OK <task> <id type="integer">747</id> <name>Meet with Mrs. Jones</name> <active type="boolean">true</active> <effectively-active type="boolean">true</effectively-active> <code></code> <description>3pm Friday</description> <url></url> <created-at type="datetime">2008-01-07T16:54:38Z</created-at> <updated-at type="datetime">2008-01-07T16:54:38Z</updated-at> <!-- if include=projects --> <project> ... <!-- if include=clients --> <client> ... </client> </project> </task>
List
Request
All tasks:
GET /tasks.xml
All active tasks:
GET /tasks/active.xml
All inactive tasks:
GET /tasks/inactive.xml
Tasks assigned to the current user:
GET /tasks/my_assignments.xml
Active tasks assigned to the current user:
GET /tasks/my_active_assignments.xml
Inactive tasks assigned to the current user:
GET /tasks/my_inactive_assignments.xml
Tasks associated with a specific project:
GET /projects/#{project-id}/tasks.xml
Active tasks associated with a specific project:
GET /projects/#{project-id}/tasks/active.xml
Inactive tasks associated with a specific project:
GET /projects/#{project-id}/tasks/inactive.xml
Optional parameters
Specify start and end to request a specific range of items. For example:
GET /tasks.xml?start=1&end=4
Specify include=projects or include=projects,clients to include related projects or projects and clients with each task. For example:
GET /tasks.xml?include=projects,clients
Response
Status: 200 OK <tasks total="6" end="6" start="1"> <task> ... </task> ... </tasks>
Create
Request
POST /tasks.xml
Include the following data with your request:
<task> <!-- name (REQUIRED) --> <name>Meet with Mrs. Jones</name> <!-- project id (REQUIRED) --> <project-id>#{project-id}</project-id> <!-- active (optional boolean, default = true) --> <active>true</active> <!-- code (optional identifier) --> <code>12345</code> <!-- description (optional) --> <description>3pm Friday</description> <!-- url (optional external link) --> <url>mailto:june@junejonesweddingalbum2008.com</url> </task>
Response
Status: 201 Created <task> <id type="integer">#{new-task-id}</id> <name>Meet with Mrs. Jones</name> <active type="boolean">true</active> <effectively-active type="boolean">true</effectively-active> <code>12345</code> <description>3pm Friday</description> <url>mailto:june@junejonesweddingalbum2008.com</url> <created-at type="datetime">2008-01-07T20:49:25Z</created-at> <updated-at type="datetime">2008-01-07T20:49:25Z</updated-at> <project-id type="integer">#{project-id}</project-id> </task>
Update
Request
PUT /tasks/#{task-id}.xml
Include ANY of the following data with your request:
<task> <name>Meet with Mrs. Jones</name> <project-id>#{project-id}</project-id> <active>true</active> <code>12345</code> <description>3pm Friday</description> <url>mailto:june@junejonesweddingalbum2008.com</url> </task>
Response
Status: 200 OK
Delete
Request
DELETE /tasks/#{task-id}.xml
Response
Status: 200 OK


