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=org and assignment_scope=user) use a single-pass RRC_FEED query with FEED_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_FEED by DOMAIN_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) or C (count)
  • Inbox: task_view (T, P), optional project_id, optional task_id (task_id requires project_id)
  • Survey (entity=S or ES): project_id (required), unit_id (required, CSV), optional task_id; task_view and id are not supported for survey. entity=ES FORM surveys use QUESTION_DATA, QUESTION_GROUP, QUESTION_RESPONSE, and optional QUESTION_RESPONSE_SCORE; responses always nest under group objects with group_handle, group_name, and questions; choice types prefer RESPONSE value over key.
  • assignment_scope: O (org, default) or U (user) — identity from auth session. 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.
  • status=F: force-close filter; actor is the logged-in user from session
  • Inbox list feed_details is 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_title and assign_to_desc are URL-decoded. task_view=P nests task blocks under a tasks object (title-keyed map) inside each project block; task_view=T is a flat task map. For task_view=T with status=C or status=F, each task also includes optional parent (title, unit_id, status) from the project feed row in RRC_FEED.
  • Survey list returns project_title at the root plus survey_data keyed by unit display name (not feed_details). Question lists are JSON arrays on project_survey_response and task_survey_responses (no form_array wrapper). When status is omitted, each unit nests completion and force_close blocks; status=C or F returns a flat unit block for that survey type only.
  • Feed notes (entity=N): project_id required; optional task_id. Single RRC_FEED query at UNIT_ID=MASTER per scope; HTML resolved from FEED_DESCRIPTION FILE pointer (legacy /feed/getFeedDescription behavior). Returns { status, notes } (not feed_details). feed_notes, project_notes, and tasks values are HTML strings. unit_id is ignored if sent. retrieve_type defaults to L; count is not supported. Inbox filters are rejected. Project scope nests task descriptions under a title-keyed tasks object.
  • Project task list (entity=T, task_view=P): project_id and unit_id required; optional task_id. Resolves feed keys from RRC_PROJECT_DATA (no ACTION_RECORD), hydrates RRC_FEED, and returns the same nested inbox task_view=P envelope (feed_details with title-keyed tasks). 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 by cluster_id + unit_id (CLUSTER_CHILD_ID=-1) before fallback placeholder project blocks are used.
  • due_window cannot be used with due_date_from / due_date_to

See devdocs/api/nextgen/task-execution/MYWORK_API_CONTRACT_Tasks.md.

Tags: MyWorkTasks

Parameters

Query parameters

NameTypeRequiredDescription
assignment_scopestringNoO (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_fromstringNo
due_date_tostringNo
due_windowstringNoRelative 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_beforestringNo
entitystringNoS 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.
limitintegerNo
project_idstringNoRequired 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.
projectionsstringNo
retrieve_typestringNoRequired for inbox and survey; defaults to L when entity=notes.
starting_afterstringNo
statusstringNo
task_idstringNoOptional 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_viewstringNo
unit_idstringNoSurvey — 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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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"
}