Retrieve simple-type survey questions for a feed

GET /task/v1/feeds/{feed_key}/survey

Operation id: getFeedSurvey

Description

Retrieves simple-type survey questions attached to a feed for the given button status. Simple surveys only — COMPLEX and FORM types return E338.


Feed Identification Modes

ModeConditionRequired Parameters
Mode Afeed_key > 0Positive feed_key in path; others optional context overrides
Mode Bfeed_key ≤ 0 (use -1)Both requested_unit_id and cluster_id required (→ E129 if either missing)

Path Parameters

ParameterTypeRequiredConstraintsDescription
feed_keyIntegerYesAny integerUse a positive value for Mode A; pass -1 for Mode B.

Language Resolution Priority

  1. requested_lang_code (if provided in request)
  2. Locale from requested_user_id kernel user-details lookup (if requested_lang_code absent and requested_user_id present)
  3. Session langCode as fallback (always available)

Language lookup failure (bad requested_user_id) is non-fatal — logs a warning and falls back to session langCode. Error messages to the client always use session langCode, regardless of the resolved service language.


Response Fields — form_array[*]

FieldTypeDescription
question_idIntegerUnique question identifier
question_textStringQuestion displayed to the user
question_typeStringInput type: RADIO, CHECKBOX, TEXT, NUMBER, DATE, DROPDOWN
mandatoryBooleantrue if the question must be answered before status change
options[]ArrayFor choice-type questions only (RADIO, CHECKBOX, DROPDOWN). Each: option_id (Integer), option_text (String)

Error Scenarios

ScenarioHTTPError CodeMessage
Missing / invalid X-reflexis-csrf-token-X401E202User session is invalid
btn_status is blank or absent400E127btn_status is mandatory
feed_key ≤ 0 and requested_unit_id or cluster_id missing400E129Either feed_key (> 0) or both unit_id and cluster_id must be provided.
Service returned null (feed not found / internal error)200E404No data found
Service returned empty array (no simple survey / complex/form type)200E338No survey data available. Either survey is Complex type, Form type, or no survey is attached.
Unexpected server-side error500E302Internal server error

Error Codes Reference

CodeDescription
E127btn_status is mandatory
E129Feed identifier mode conflict (Mode B missing required params)
E202User session is invalid
E302Internal server error
E338No simple survey available (complex/form type or none attached)
E404No data found

Tags: MyWorkFeeds

Parameters

Path parameters

NameTypeRequiredDescription
feed_keyintegerYesUnique numeric feed identifier

Query parameters

NameTypeRequiredDescription
btn_statusstringYesAction trigger type: C=Completion survey, F=Force-Close survey (mandatory — E127 if missing)
cluster_child_idstringNoCluster child identifier (Mode B optional context)
cluster_idstringNoCluster identifier. Required when feed_key ≤ 0 (Mode B)
requested_dept_idstringNoDepartment ID of the target user
requested_lang_codestringNoLanguage code for service response — overrides session language when present
requested_profile_idstringNoProfile ID of the target user
requested_unit_idstringNoUnit ID of the target user. Required when feed_key ≤ 0 (Mode B)
requested_user_idstringNoUser ID of the data owner — used for locale resolution and service context

Security

  • AuthTokenHeader (apiKey)
    • Session authentication token validated server-side against the user session store.

Responses

200 — Success — {status: OK, form_array[]}.

No data → E404. No simple survey (complex/form type or none) → E338.

Content type: application/json

400 — - E127 — btn_status is mandatory

  • E129 — feed_key ≤ 0 and required_unit_id or cluster_id missing

Content type: application/json

401 — Missing or invalid X-reflexis-csrf-token-X session token

Content type: application/json

500 — Unexpected server-side error

Content type: application/json

Response models

200 — Success — {status: OK, form_array[]}.

No data → E404. No simple survey (complex/form type or none) → E338.

Content type: application/json

Schema

JSON object (structure varies by endpoint).

{
  "type": "object",
  "description": "JSON object (structure varies by endpoint)."
}

Example:

{
  "status": "OK",
  "form_array": [
    {
      "question_id": 1,
      "question_text": "Was the task completed satisfactorily?",
      "question_type": "RADIO",
      "mandatory": true,
      "options": [
        {
          "option_id": 1,
          "option_text": "Yes"
        },
        {
          "option_id": 2,
          "option_text": "No"
        }
      ]
    }
  ]
}

400 — - E127 — btn_status is mandatory

  • E129 — feed_key ≤ 0 and required_unit_id or cluster_id missing

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E202, E105, E404)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E202",
    "response": "User session is invalid"
  },
  "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. E202, E105, E404)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

401 — Missing or invalid X-reflexis-csrf-token-X session token

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E202, E105, E404)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E202",
    "response": "User session is invalid"
  },
  "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. E202, E105, E404)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "errorCode": "E202",
  "response": "User session is invalid"
}

500 — Unexpected server-side error

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E202, E105, E404)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E202",
    "response": "User session is invalid"
  },
  "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. E202, E105, E404)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "errorCode": "E302",
  "response": "Internal server error"
}