V5 REST API response object suggestions

0

We are starting to migrate to V5 for all our services that use the REST API to retrieve survey data.  In general, it’s much easier to parse.  So thanks for that.  There are a few things we noticed that would make our lives much easier (and parsing code much cleaner).

This is mostly in retrieving the responses to a survey.

  • Radio type is just a special case of a checkbox, why not make both have the same format?
  • The values for BOTH checkbox and radio questions reported should be 
    • the label of option (missing in Radio type), 
    • reporting value (missing in Checkbox if the option has a write in value)
    • checkboxes should have type ‘Checkbox’ (radio has type ‘RADIO’)
  • Since all responses share the question text field, why not move it out and report it once at the beginning of the data or have users get it from the Survey Object — that would save a lot on space for large surveys with many responses
  • IF a checkbox question is marked as optional AND the question is skipped, the response data will NOT have the data regarding this question.  However, a skipped radio question WILL have the data.  We have hacked into our parser to add this data, but skipped checkbox questions should be added (just as other skipped questions).

 The above recommendations can be seen with a very small data set shown below. The following data is from a test survey (5278088) and pulled using V5 Rest API.

The survey has one Radio type and one Checkbox type.    I noted the strange/inconsistent data.

RADIO Question
“2”: {
“id”: 2,
“type”: “RADIO”,
“question”: “RADIO who”,
“section_id”: 1,
“original_answer”: “2000”, <= REPORTING VALUE
“answer”: “2000”,
“answer_id”: 10002,
“shown”: true
},

RADIO Question with Write in
“2”: {
“id”: 2,
“type”: “RADIO”,
“question”: “RADIO who”,
“section_id”: 1,
“original_answer”: “1000”, <= REPORTING VALUE
“answer”: “A MIKE”,          <= WRITE IN VALUE
“answer_id”: “10001-other”,
“shown”: true
},

CHECK BOX Question with Write In
“3”: {
“id”: 3,
“type”: “parent”,                    <= WHY NOT CheckBox or something like that
“question”: “CheckBox Who”,
“section_id”: 1,
“options”: {
“10005”: {
“id”: 10005,
“option”: “A”,            <= LABEL; LOST IS THE REPORTING VALUE
“answer”: “CB MIKE” <= WRITE IN VALUE
},
“10006”: {
“id”: 10006,
“option”: “B”,       <= LABEL
“answer”: “2000” <= REPORTING VALUE
}
},
“shown”: true
}

 

WayMark244268 edited question
    ×

    Login

    Question stats

    • Active
    • Views113 times
    • Answers0 answers
    • Followers1 follower