Retrieve tasks or projects with Mongo routing and feed hydration
GET /v1/tasks
Operation id: retrieveTasks
Description
Scope-based query flow for task/project retrieval:
- Inbox queries (both
assignment_scope=organdassignment_scope=user) use a single-passRRC_FEEDquery withFEED_TYPE=T, applying limit/skip pagination and hydrating directly from fetched feed rows (no second feed-key reload round). - Survey/notes/project-task flows use their dedicated entity-specific data paths. Final payload hydration reads
RRC_FEEDbyDOMAIN_ID + FEED_KEY.
Data availability: Simple survey (entity=S) response data is sourced from the ACTION_RECORD collection, which has a 90-day archive period. External/FORM survey (entity=ES) data uses dedicated FORM collections and is not subject to this archive policy. Inbox list/count results are governed by explicit due_date_from/due_date_to parameters or domain-configured defaults.
Key parameters:
retrieve_type:L(list) orC(count)- Inbox:
task_view(T,P), optionalproject_id, optionaltask_id(task_idrequiresproject_id) - Survey (
entity=SorES):project_id(required),unit_id(required, CSV), optionaltask_id;task_viewandidare not supported for survey.entity=ESFORM surveys use QUESTION_DATA, QUESTION_GROUP, QUESTION_RESPONSE, and optional QUESTION_RESPONSE_SCORE; responses always nest under group objects withgroup_handle,group_name, andquestions; choice types prefer RESPONSEvalueoverkey. assignment_scope:O(org, default) orU(user) — identity from auth session. Both scopes use feed-based resolution fromRRC_FEED.orgfilters by session unit_id/profile_id/dept_id;userfilters by session user_id as assignee.status=F: force-close filter; actor is the logged-in user from session- Inbox list
feed_detailsis a title-keyed object (not an array). Each value has 12 fields:display_launch_date,feed_title,task_count,end_date_time,has_survey,priority,assign_to_desc,last_updated_time,status,unit_id,profile_id,dept_id.feed_titleandassign_to_descare URL-decoded.task_view=Pnests task blocks under atasksobject (title-keyed map) inside each project block;task_view=Tis a flat task map. Fortask_view=Twithstatus=Corstatus=F, each task also includes optionalparent(title,unit_id,status) from the project feed row inRRC_FEED. - Survey list returns
project_titleat the root plussurvey_datakeyed by unit display name (notfeed_details). Question lists are JSON arrays onproject_survey_responseandtask_survey_responses(noform_arraywrapper). Whenstatusis omitted, each unit nestscompletionandforce_closeblocks;status=CorFreturns a flat unit block for that survey type only. - Feed notes (
entity=N):project_idrequired; optionaltask_id. SingleRRC_FEEDquery atUNIT_ID=MASTERper scope; HTML resolved fromFEED_DESCRIPTIONFILE pointer (legacy/feed/getFeedDescriptionbehavior). Returns{ status, notes }(notfeed_details).feed_notes,project_notes, andtasksvalues are HTML strings.unit_idis ignored if sent.retrieve_typedefaults toL; count is not supported. Inbox filters are rejected. Project scope nests task descriptions under a title-keyedtasksobject. - Project task list (
entity=T,task_view=P):project_idandunit_idrequired; optionaltask_id. Resolves feed keys fromRRC_PROJECT_DATA(noACTION_RECORD), hydratesRRC_FEED, and returns the same nested inboxtask_view=Penvelope (feed_detailswith title-keyedtasks). Pagination applies to task rows only. Inbox filters are rejected. Returns 404 when no project row exists for the project/unit pair. Count (retrieve_type=C) returns task-row count only (excluding project row-1). - Inbox
task_view=P: when matching rows include tasks but omit project rows, parent project feed details are resolved bycluster_id + unit_id(CLUSTER_CHILD_ID=-1) before fallback placeholder project blocks are used. due_windowcannot be used withdue_date_from/due_date_to
See devdocs/api/nextgen/task-execution/MYWORK_API_CONTRACT_Tasks.md.
Tags: MyWorkTasks
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
assignment_scope | string | No | O (org, default) uses session unit_id, profile_id, dept_id. U (user) uses session user_id as assignee. Identity is never passed as query params. Both scopes use feed-based resolution from RRC_FEED. org filters by session unit_id/profile_id/dept_id; user filters by session user_id as assignee. |
due_date_from | string | No | |
due_date_to | string | No | |
due_window | string | No | Relative due-date window filter. For /v1/tasks inbox flow, today is evaluated using UTC day boundaries (00:00:00.000Z to 23:59:59.999Z). T(today), TO(tomorrow), TW(this_week), NW(next_week), O(overdue) |
ending_before | string | No | |
entity | string | No | S or ES for survey; N for feed notes; T with task_view=P for project task list by RRC_PROJECT_DATA; other values use inbox task_view/project_id/task_id routing. |
limit | integer | No | |
project_id | string | No | Required for survey (entity S or ES). Required for notes (entity=notes). Required for project task list (entity=T with task_view=P). Optional inbox filter (CLUSTER_ID) and required when task_id is sent. |
projections | string | No | |
retrieve_type | string | No | Required for inbox and survey; defaults to L when entity=notes. |
starting_after | string | No | |
status | string | No | |
task_id | string | No | Optional survey, notes, project-task-list, or inbox task filter — CLUSTER_CHILD_ID in RRC_PROJECT_DATA or RRC_FEED. For inbox flow, requires project_id. |
task_view | string | No | |
unit_id | string | No | Survey — CSV of UNIT_ID values. Required for entity=T with task_view=P. Ignored for entity=notes (feed lookup uses MASTER). |
Security
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store.
Responses
200 — List or count response
Content type: application/json
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
500 — Unexpected server-side error
Content type: application/json
Response models
200 — List or count response
Content type: application/json
Schema
{
"type": "object"
}
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
}
500 — Unexpected server-side error
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E302",
"response": "Internal server error"
}