Skip to content
Alexander Elgin edited this page Jan 26, 2017 · 10 revisions

It is used to get list of answers by provided assessment id

Request

Sample

/api/public/answers/UZ-2016-MI

Format

/api/public/answers/:assessmentID

Response

Sample

[
  {
    "_id": "5800c7b6412f40b62190dea4",
    "answer_ID": "UZ-2016-MI-001",
    "question_ID": {
      "_id": "561fe604f004cd4715705420",
      "question_order": 1,
      "question_label": "1.a",
      "precept": 2,
      "component_text": "Legal and Regulatory Structure",
      "dejure": true,
      "question_text": "Is the EITI ratified in national legislation?",
      "question_criteria": [
        {
          "text": "Yes",
          "name": "criteria_a",
          "letter": "a",
          "order": 1,
          "value": 1,
          "_id": "57f5f5c74a0a1e3415c4811d"
        },
        {
          "text": "Partial",
          "name": "criteria_b",
          "letter": "b",
          "order": 2,
          "value": 2,
          "_id": "57f5f5c74a0a1e3415c4811c"
        },
        {
          "text": "No",
          "name": "criteria_d",
          "letter": "c",
          "order": 3,
          "value": 3,
          "_id": "57f5f5c74a0a1e3415c4811b"
        },
        {
          "text": "Not applicable/other. (Explain in 'comments' box.)",
          "name": "criteria_e",
          "letter": "d",
          "order": 4,
          "value": -999,
          "_id": "57f5f5c74a0a1e3415c4811a"
        }
      ]
    },
    "question_trial": true,
    "assessment_ID": "UZ-2016-MI",
    "year": "2016",
    "version": "MI",
    "question_order": 1,
    "question_v": 3,
    "__v": 5,
    "researcher_justification": "<p>NA</p>",
    "researcher_resolve_flag_required": true,
    "references": [
      {
        "citation_type": "interview",
        "interviewee_ID": "5800c8d3412f40b62190debd",
        "comment": "<p>NA</p>",
        "author": "57f5f4fdd513e7d214aef677",
        "_id": "5800c8e3412f40b62190dec0",
        "document_ID": null,
        "hidden": false,
        "date": "2016-10-14T12:00:35.699Z",
        "contact_date": "2016-10-05T18:00:00.000Z",
        "date_accessed": "2016-10-14T12:00:35.699Z"
      },
      {
        "citation_type": "document",
        "document_ID": "580887d8612e69c635ef7007",
        "file_hash": "56864463d1585b8b001ae436f0e9b79a61d293a3",
        "author": {
          "_id": "57f5f4fdd513e7d214aef675",
          "firstName": "Chris",
          "lastName": "Perry",
          "role": "researcher"
        },
        "location": "7",
        "comment": "No comments",
        "_id": "58100e7ca9e394e6092c0e84",
        "hidden": false,
        "date": "2016-10-26T02:01:32.818Z",
        "contact_date": "2016-10-26T02:01:32.818Z",
        "date_accessed": "2016-10-03T18:00:00.000Z"
      }
    ],
    "comments": [],
    "dependancy_hidden": false,
    "flags": [
      {
        "content": "<p>Test flag</p>",
        "author": "57f5f4fdd513e7d214aef674",
        "addressed": false,
        "addressed_to": "57f5f4fdd513e7d214aef675",
        "_id": "581347e3913fe0052fb63db7",
        "date": "2016-10-28T12:43:15.146Z"
      }
    ],
    "external_answer": [],
    "reviewer_score_history": [],
    "researcher_score_history": [
      {
        "order": 1,
        "justification": "<p>NA</p>",
        "_id": "5800c8e3412f40b62190dec1",
        "score": {
          "value": 1,
          "order": 1,
          "letter": "a",
          "name": "criteria_a",
          "text": "Yes"
        },
        "date": "2016-10-14T12:00:35.683Z"
      },
      {
        "order": 2,
        "justification": "<p>NA</p>",
        "_id": "5800c944412f40b62190decd",
        "score": {
          "value": 2,
          "order": 2,
          "letter": "b",
          "name": "criteria_b",
          "text": "Partial"
        },
        "date": "2016-10-14T12:02:12.530Z"
      },
      {
        "order": 3,
        "justification": "<p>NA</p>",
        "_id": "58100e7ca9e394e6092c0e85",
        "score": {
          "value": 2,
          "order": 2,
          "letter": "b",
          "name": "criteria_b",
          "text": "Partial"
        },
        "date": "2016-10-26T02:01:32.791Z"
      },
      {
        "order": 4,
        "justification": "<p>NA</p>",
        "_id": "581347e3913fe0052fb63db8",
        "score": {
          "value": 2,
          "order": 2,
          "letter": "b",
          "name": "criteria_b",
          "text": "Partial"
        },
        "date": "2016-10-28T12:43:15.201Z"
      }
    ],
    "researcher_score": {
      "text": "Partial",
      "name": "criteria_b",
      "letter": "b",
      "order": 2,
      "value": 2
    },
    "last_modified": {
      "modified_by": "57f5f4fdd513e7d214aef674",
      "modified_date": "2016-10-28T12:43:15.201Z"
    },
    "status": "flagged",
    "guidance_dialog": false
  }
]

Format

Linked Question

  • question_ID includes linked question data like title, choice list and etc.

Reference Item

  • document_ID is _id of the linked document (see Document List for more info). It is not empty only if the citation_type field is equal to 'document'.
  • hidden defines the reference visibility. If it equals to true the reference should be skipped
Clone this wiki locally