On this page
tasks
query · in the family Task
What it does
The task list — each entry is a task — a to-do assigned to people or teams.
The caller's org-group family's ACTIVE LISTING of Tasks — doomed records DROP from listings. PAGINATED: limit clamps to [1, 200], default 100; nextToken = the prior page's cursor, verbatim — opaque + tenant-bound (a malformed or foreign token → VALIDATION/INVALID). Walk until nextToken is null (a page may hold fewer than limit — doomed drop per page). FILTERS: status — Only tasks in THIS FSM status (open | in_progress | postponed | completed | cancelled — the inbox surfaces default to the LIVE states client-side; cancelled is the doomed class). assigneeUserId — Only tasks whose assigneeUserIds contain THIS User. labelId — Only tasks whose labelIds contain THIS TaskLabel. dueBefore — Only tasks with dueAt strictly BEFORE this ISO-8601 instant. STRUCTURED FILTER + SORT: filter = AND across clauses, OR within a clause's values; sort = one declared field, asc/desc. The declared Task roster: caption (text) · status (enum) · priority (enum) · description (text) · createdBy (ref) · reportTo (ref) · dueAt (date) · createdAt (date) · updatedAt (date). An illegal filter/sort refuses VALIDATION/INVALID NAMING the exact problem (an unknown field teaches the roster). A filtered/sorted read evaluates the WHOLE family server-side, returns the EXACT matchCount, and its nextToken binds to THE ONE filter+sort that minted it — replaying it under a different filter/sort refuses. Absent both, the unfiltered lane is unchanged (matchCount null). ⚠ The flat filters and the structured filter/sort do NOT combine — a read passing both refuses VALIDATION/INVALID naming the mix (compose the whole ask as filter clauses, or use the flat filters alone).
What happens
Reads only — changes nothing.
Who may call it
Capability area: Reading your records — Looking up and listing the records of your organization.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:tasks
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
filter | FilterInput | no | Which records to answer — clauses over the family’s filterable fields (the FilterInput type and the paging guide carry the grammar). |
sort | SortInput | no | The order to answer in — one declared field and a direction (the SortInput type carries the grammar). |
status | String | no | No further notes. |
assigneeUserId | ID | no | No further notes. |
labelId | ID | no | No further notes. |
dueBefore | String | no | No further notes. |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
Returns
TaskPage TaskPage! — One page of the tasks listing — the records + the opaque resume cursor.
This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.
Example request
query ExampleTasks($filter: FilterInput) {
tasks(filter: $filter) {
items {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
description
priority
createdBy
systemOrigin
reportTo
assigneeUserIds
teamIds
labelIds
dueAt
overdue
linkedFromTaskId
returnAt
originNoteId
originAnchorType
originAnchorId
}
nextToken
matchCount
}
}
Variables:
{
"filter": {
"clauses": [
{
"field": "caption",
"op": "contains",
"values": [
"Blue"
]
}
]
}
}
Example response
{
"data": {
"tasks": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "TK-EXMP-0000-000F",
"type": "Task",
"caption": "Blue jeans",
"status": "open",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"description": "Straight-cut, mid-rise, five pockets.",
"priority": "<priority>",
"createdBy": "01900000-0000-7000-8000-0b14e5a60000",
"systemOrigin": "<system origin>",
"reportTo": "01900000-0000-7000-8000-9d69c9660000",
"assigneeUserIds": [
"01900000-0000-7000-8000-fbe5fcb10000"
],
"teamIds": [
"01900000-0000-7000-8000-1abd3d160000"
],
"labelIds": [
"01900000-0000-7000-8000-a235e7410000"
],
"dueAt": "2027-01-31T00:00:00.000Z",
"overdue": true,
"linkedFromTaskId": "01900000-0000-7000-8000-6de8c4e00000",
"returnAt": "2027-01-31T00:00:00.000Z",
"originNoteId": "01900000-0000-7000-8000-f1eb5d520000",
"originAnchorType": "<origin anchor type>",
"originAnchorId": "01900000-0000-7000-8000-323b002b0000"
}
],
"nextToken": "<the cursor from the previous page>",
"matchCount": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)