List Tasks
The following macros are not currently supported in the header:
  • style

List Tasks

Resource URL

Returns an array of tasks

GET /tasks ANY /tasks?_method=get

Parameters

Table of allowed paramaters.

_page

unsigned int

The page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources.

_limit

unsigned int

The maximum number of resources to return. Default is 10 and maximum is 50.

_offset

unsigned int

The position in the list of resources to return from. For example, if you had 20 resources and requested an offset of 10. Resources 10 to 19 would be returned. Offset cannot be used in conjunction with _page.

_fields

partial string

Allows you to specify optional fields and linked objects to include in the response.

_filters

partial string

Filter the returned list of tasks using the filters below.

Filtering tasks

You can filter the returned list using the _filters parameter. You can stack filters. For example, _filters=assignee(21,3),against(company),manager(2,5)

 

Name

Example

Description

Name

Example

Description

assignee(...) or assignee_not(...)

_filters=assignee(12,3)

Only return tasks that are assigned to the specified staff id(s)

manager_id(...) or manager_id_not(...)

_filters=manager_id(324)

Only return tasks that are managed by one of the specified staff id(s)

status(...) or status_not(...)

_filters=status(1,2,4)

Only return tasks at the specified status(es).

against_type(...) or against_type_not(...)

_filters=against_type(company, issue)

Only return tasks that are against a specific object type. Available object types include: company, component, issue and prospect. That is, any object that can have a task against it.

against_id(...) or against_id_not(...)

_filters=against_id(1,32)

Only return tasks against an object with id

against(type1(...),typeN(...))

_filters=against(company(1,4),issue(4,5))

Only return tasks with the matching against values. The example will only return tasks against company 1 and 4 or tasks against issue 4 and 5.

max_id(<id>)

_filters=max_id(12)

Only return tasks with id less or equal to max id

min_id(<id>)

_filters=min_id(1)

Only return tasks with id greater to or equal to min id.

date_<date_column>_before(<unix timestamp>), date_<column>_after(<unix_timestamp>), where <date column> can be created, started, commenced, accepted, completed, modified and due.

_filters=date_due_before(1402525375)

 

standing(<statuses>) or standing_not(<statuses>)

_filters=standing(complete,started)

Only return provided standing(s). Options:

'pending','accepted','started','complete','inactive'

order_by_asc(<type>), order_by_desc(<type>)

_filters=order_by_desc(id)

Accepts: id, date_created, date_started, date_commenced, date_accepted, date_completed, date_modified and date_due

NEW title, standing and status

NEW

<field_name>_greater_than(<value>),

<field_name>_less_than(<value>),

<field_name>_greater_than_or_equal(<value>),

<field_name>_less_than_or_equal(<value>)



_filters=id_greater_than(5)

Available fields:

id, billable, nonbillable, budgeted, remaining, against_id, creator_id, assignee, type, status, manager and contact

Using the _not suffix (e.g, id_not) on standard in filters will return results not in.

Handling the response

For handling the response, please see GET /tasks:id.

Sample Response

GET /tasks.json?_fields=date_created,date_started,assignee(email),type(color)&_limit=2
{ "response" : [ { "date_created" : "1003327200", "assignee" : { "email" : "geoff.mcqueen@affinitylive.com", "firstname" : "Geoff", "id" : "1000", "surname" : "McQueen" }, "type" : { "title" : "Default", "id" : "1" }, "title" : "Complaints System Database", "id" : "1", "date_started" : "1003327200" }, { "date_created" : "1017320400", "assignee" : { "email" : "adrian@internetrix.com.au", "firstname" : "Adrian", "id" : "3", "surname" : "Smalley" }, "type" : { "title" : "Default", "id" : "1" }, "title" : "Design Refinement and Tweaking", "id" : "2", "date_started" : "1017320400" } ], "meta" : { "status" : "ok", "message" : "Everything executed as expected." } }