GET Tasks
Overview
The task list endpoint returns tasks generated for group members. A valid group UUID is required. Use the
includeSubgroups
property to get tasks for an entire branch of the group hierarchy. This is useful for multi-site or
cross-program data access.
Query parameters
includeSubgroups |
(boolean) Determines whether to include tasks for members that belong to child groups of the
specified group UUID. |
type |
(string) Limit the result to tasks of the specified type. |
progress |
(string) Limit the results to tasks within the specified progress range. Progress is specified as a
colon-delimited range of numbers from 0.0 to 1.0. Example: progress=0.23:0.9 |
status |
(string) Limit the results to tasks with the specified status. |
taskDateStart |
(date) A date in ISO 8601 standard format (yyyy-MM-dd). If present, the result is limited to tasks
on or after the specified date. If both taskStartDate and taskEndDate are specified, taskEndDate cannot be before
taskStartDate. |
taskDateEnd |
(date) A date in ISO 8601 standard format (yyyy-MM-dd). If present, the result is limited to tasks
on or before the specified date. If both taskStartDate and taskEndDate are specified, taskEndDate cannot be before
taskStartDate. |
limit |
|
offset |
|
sortBy |
See Paging parameters |
sortDirection |
Curl example
curl -X GET \
'https://API_HOSTNAME/api/v1/groups/GROUP_UUID/tasks?\
includeSubgroups=true&startDate=2019-05-20&endDate=2019-05-21&\
sortBy=START&sortDirection=ASC&limit=10&offset=10&progress=0.5:1.0&\
type=takeSurvey' \
--header 'Authorization: Bearer BEARER_TOKEN'
Response
The response is a list of tasks, with additional fields that contain paging metadata and links to the previous and next pages, if they exist.
Response body
{
"totalCount": 10604,
"limit": 10,
"offset": 10,
"results": [
{
"uuid": "TASK_UUID",
"href": "/api/v1/groups/GROUP_UUID/tasks/TASK_UUID",
"activityUuid": "ACTIVITY_UUID",
"group": {
"href": "/api/v1/groups/GROUP_UUID",
"title": "My Group"
},
"member": {
"href": "/api/v1/groups/GROUP_UUID/members/USER_UUID",
"title": "John Doe"
},
"startTime": "2019-05-20T11:00:00Z",
"endTime": "2019-05-21T03:00:00Z",
"adHoc": false,
"status": "completed",
"type": "takeSurvey",
"progress": 1.0,
"finishTime": "2019-05-20T15:13:38.515Z",
"title": "Survey Title",
"taskDate": "2019-05-20"
},
...
],
"nextPage": "https://API_HOSTNAME/api/v1/groups/GROUP_UUID/tasks?includeSubgroups=true&&startDate=2019-05-20&endDate=2019-05-21&sortBy=START&sortDirection=ASC&offset=20&limit=10&progress=0.5:1.0&type=takeSurvey",
"previousPage": "https://API_HOSTNAME/api/v1/groups/GROUP_UUID/tasks?includeSubgroups=true&startDate=2019-05-20&endDate=2019-05-21&&sortBy=START&sortDirection=ASC&offset=0&limit=10&progress=0.5:1.0&type=takeSurvey"
}
Result attributes
The task list response elements are the same as GET Task details, except the task list does not contain measurements.