GET/users/{userId}/tasks/search

Search user task.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

task
task.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/users/{userId}/tasks/search

Path Parameters

ParameterTypeDescription
userId string 

User ID


required
example : userf7da-f82c-4284-13e7-030f3b4c756x 

Query Parameters

ParameterTypeDescription
query string 

search term

  • Search for the Title, Content, and the name of the Assignee/Assignor.
  • If no search term is specified, You must specify one of the assignorId, assignneeId, duration (startTime/endTime).
  • Case-insensitive.
  • URL encoding is required.

minLength : 1
maxLength : 100
example : Weekly Meeting 
assignorId string 

Assignor ID

 
assigneeId string 

Assignee ID

 
startTime string 

Start time of search

  • Specified in ISO-8601 format (YYY-MM-DDThh:mm:ssTZD).
  • If startTime and endTime are not specified, the search is for the entire period.
  • There is no limit to the maximum search period.

format : date-time 
endTime string 

End time of search

  • Specified in ISO-8601 format (YYY-MM-DDThh:mm:ssTZD).
  • If startTime and endTime are not specified, the search is for the entire period.
  • There is no limit to the maximum search period.

format : date-time 
status string 

Task status


Allowed values : DONE, TODO 
hasDueDate boolean 

Presence or absence of dueDate.

  • If not specified, search for both tasks with dueDate and without dueDate.
  • true : Search only for tasks with dueDate.
  • false: Search only tasks that do not have dueDate.
 
hasAttachment boolean 

Attachment availability

  • true: Search only for tasks with attachments
  • false: Search regardless of whether there are attachments

default : false 
orderBy string 

Sort criteria

  • createdTime: Creation time
  • dueDate: Due date
    Separate the sort criteria and method with a space (URL-encoded value: %20).
    If no sorting method is specified, the default is ascending (asc); to sort in descending order, specify (desc).
    Only a single field may be specified for sorting.

default : createdTime
example : createdTime desc 
count integer 

Number of tasks to get at once


default : 50
maximum : 100 
cursor string 

Cursor value

 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
tasks array (Task) 
 
responseMetaData object (responseMetaData) 
 

Task

PropertyTypeDescription
assignees array (Assignee) 

Assignee information

 
assignorId string 

Assignor ID

  • If the member has been deleted, respond with an empty value.
 
assignorName string 

Assignor name

 
completionCondition string 

Completion options

  • ANY_ONE: A task that any one assignee can complete
  • MUST_ALL: A task that all assignees must complete.

Note

  • When updating a task, it is available only if there are two or more assignees.

Allowed values : ANY_ONE, MUST_ALL 
content string 

Content

 
createdTime string 

Creation time (YYYY-MM-DDThh:mm:ssTZD)


readOnly : true 
dueDate string 

Due date (YYYY-MM-DD)


nullable : true 
modifiedTime string 

Update time (YYYY-MM-DDThh:mm:ssTZD)


readOnly : true 
resourceLocation integer 

The instance where the original task is located


readOnly : true 
status string 

Task status

  • DONE: Complete
  • TODO: Incomplete

Note

  • The status of an assignee's new task is always set to TODO.
  • You can change the status of a task using the the following API operations.
  • Mark a task as complete
  • Mark a task as incomplete
  • Mark an assignee task as complete
  • Mark an assignee task as incomplete

Allowed values : DONE, TODO 
taskId string 

Task ID

 
title string 

Title

 

Assignee

PropertyTypeDescription
assigneeId string 

Assignee ID

  • If the member has been deleted, respond with an empty value.

required 
assigneeName string 

Assignee name


readOnly : true 
status string 

Task status

  • DONE: Complete
  • TODO: Incomplete

Note

  • The status of an assignee's new task is always set to TODO.
  • You can change the status of a task using the the following API operations.
  • Mark a task as complete
  • Mark a task as incomplete
  • Mark an assignee task as complete
  • Mark an assignee task as incomplete

required
Allowed values : DONE, TODO 

responseMetaData

PropertyTypeDescription
nextCursor string 
 

Response Example

example

1{2  "tasks": [3    {4      "taskId": "95e426f5-9c85-4d28-9c41-f22950398c9c",5      "assignorId": "userf7da-f82c-4284-13e7-030f3b4c756x",6      "assignorName": "Susan Nielsen",7      "assignees": [8        {9          "assigneeId": "userf7da-f82c-4284-13e7-030f3b4c754x",10          "assigneeName": "Assignee Name",11          "status": "TODO"12        }13      ],14      "completionCondition": "MUST_ALL",15      "title": "meeting prep",16      "content": "reserve a meeting room",17      "status": "TODO",18      "dueDate": "2024-05-25",19      "resourceLocation": 14101,20      "createdTime": "2024-04-04T04:52:06.405Z",21      "modifiedTime": "2024-04-04T05:41:52.624Z"22    }23  ],24  "responseMetaData": {25    "nextCursor": "H4sIAAAAAAAA_6tWSk4sSU3PL6r0TFGyUkopTda1MDAwM7UwN1LSUUouLS7Jz_UvSkktUrKqVsqHMJRyc3NzKpRqawHgjprNPQAAAA"26  }27}