Retrieve Tasks Collection
CUSTOM-ENDPOINT
GET https://api.speakap.io/networks/:eid/tasks/
CUSTOM-REQUEST
- URI: /networks/{networkEID}/tasks/
- Method: GET
- Accept: application/json
- Authentication: OAuth 2.0
Parameters
| Name | Type | Description |
|---|
| networkEID | EID | Network EID |
Filters
| Name | Type | Description |
|---|
| limit | int | The limit of returned tasks (default: 10) |
| offset | int | The offset for pagination |
Task Filters
| Name | Type | Description |
|---|
| author | EID | Filter tasks by author (creator) profile EID |
| authors | EID[] | Filter tasks by multiple author profile EIDs |
| assignee | EID | Filter tasks by assignee profile EID |
| completed | boolean | Filter by completion status (true, false, 1, 0) |
| exclude_recipient | EID | Exclude tasks with the given recipient EID |
| recipients | EID | Filter tasks by recipient EID (user or group) |
| tags | EID[] | Filter tasks by tag EIDs |
| parent | EID | Filter tasks by parent EID |
Date Filters
| Name | Type | Description |
|---|
| due_date_from | datetime | Filter tasks with due date from this date (supports now, relative dates) |
| due_date_to | datetime | Filter tasks with due date until this date (supports now, relative dates) |
| created_at_from | datetime | Filter tasks created from this date |
| created_at_to | datetime | Filter tasks created until this date |
Embedding
| Name | Type | Description |
|---|
| embed | string | Comma-separated list of resources to embed. Options: messages, messages.recipients, messages.author, messages.completedBy, messages.tags |
Sorting
By default, tasks are sorted by dueDate (asc), completedAt (desc), created (desc).
| Name | Type | Description |
|---|
| sort[dueDate] | string | Sort by due date. Values: asc, desc |
| sort[completedAt] | string | Sort by completion date. Values: asc, desc |
| sort[created] | string | Sort by creation date. Values: asc, desc |
| sort[title] | string | Sort by title. Values: asc, desc |
Examples
Get all tasks assigned to a specific user
GET /networks/{networkEID}/tasks/?embed=messages&assignee={profileEID}
Get all tasks created by a specific author
GET /networks/{networkEID}/tasks/?embed=messages&author={profileEID}
Get completed tasks
GET /networks/{networkEID}/tasks/?embed=messages&completed=true
Get tasks created by author excluding self-assigned
GET /networks/{networkEID}/tasks/?embed=messages&author={profileEID}&exclude_recipient={profileEID}
Get overdue tasks (due date before now)
GET /networks/{networkEID}/tasks/?embed=messages&due_date_to=now
Get tasks due within 24 hours
GET /networks/{networkEID}/tasks/?embed=messages&due_date_from=now&due_date_to=+24 hour
Get tasks with pagination and sorting
GET /networks/{networkEID}/tasks/?embed=messages&limit=10&offset=0&sort[title]=asc
Response