Search tasks by criteria
Search View as Markdown
GET/api/search/task
Returns matching tasks within joined projects. result=ids returns all matching task ids; result=items returns paged display summaries. Multiple values in one field are OR-ed. Each field mode assigns the condition to a group: and (must match), or (cross-field any-match group), exclude (must not match; tasks with the field unset are kept unless "none" is listed). The literal value "none" means the field is unset.
Parameters
projectId"@all" | integerqueryRequired- A project ID, or
@allfor every open project you belong to. qstringquery- Keywords to search for in the task name and description (up to 200 characters). Separate keywords with spaces (up to 5); a task must match all of them.
statusIdsstringquery- Comma-separated status IDs (up to 100).
nonematches tasks with no value. statusModeand | or | excludequery- How to combine
statusIds.and: tasks matching any listed value, required together with the other conditions;or: tasks matching any listed value, where a match on anyorcondition is enough;exclude: tasks matching none of the values. Defaults toand. milestoneIdsstringquery- Comma-separated milestone IDs (up to 100).
nonematches tasks with no value. milestoneModeand | or | excludequery- How to combine
milestoneIds.and: tasks matching any listed value, required together with the other conditions;or: tasks matching any listed value, where a match on anyorcondition is enough;exclude: tasks matching none of the values. Defaults toand. prioritiesstringquery- Comma-separated priorities (up to 100):
1high,2medium,3low.nonematches tasks with no priority. priorityModeand | or | excludequery- How to combine
priorities.and: tasks matching any listed value, required together with the other conditions;or: tasks matching any listed value, where a match on anyorcondition is enough;exclude: tasks matching none of the values. Defaults toand. responsibleUserIdsstringquery- Comma-separated user IDs of the assignee (up to 100).
nonematches tasks with no value. responsibleUserModeand | or | excludequery- How to combine
responsibleUserIds.and: tasks matching any listed value, required together with the other conditions;or: tasks matching any listed value, where a match on anyorcondition is enough;exclude: tasks matching none of the values. Defaults toand. ballHoldingUserIdsstringquery- Comma-separated user IDs of the ball holder (the person who has to act next) (up to 100).
nonematches tasks with no value. ballHoldingUserModeand | or | excludequery- How to combine
ballHoldingUserIds.and: tasks matching any listed value, required together with the other conditions;or: tasks matching any listed value, where a match on anyorcondition is enough;exclude: tasks matching none of the values. Defaults toand. tagIdsstringquery- Comma-separated tag IDs (up to 100).
nonematches tasks with no value. tagModeand | or | excludequery- How to combine
tagIds.and: tasks matching any listed value, required together with the other conditions;or: tasks matching any listed value, where a match on anyorcondition is enough;exclude: tasks matching none of the values. Defaults toand. dueDateFromintegerquery- Return only tasks due at or after this time, in Unix epoch milliseconds.
dueDateTointegerquery- Return only tasks due at or before this time, in Unix epoch milliseconds.
hasDueDate0 | 1 | true | falsequerytruereturns only tasks with a due date,falseonly tasks without one (true,false,1or0). Omit for both.includeClosed0 | 1 | true | falsequery- Whether to include tasks in a closed status:
true,false,1or0. Defaults tofalse. overdueOnly0 | 1 | true | falsequerytruereturns only unfinished tasks whose due date has passed (closed tasks are always excluded). Defaults tofalse.resultids | itemsquery- Shape of the response.
idsreturns matching task IDs;itemsreturns task summaries, 30 per page. Defaults toids. pageintegerquery- Page number, starting at 1. Used only when
resultisitems.
Responses
200Matching tasks ({ taskIds, truncated } or { items, hasMore })400Invalid query401Authentication is required