Skip to main content

Get Question Statistics Overview

API Overview

  • Function: Get question statistics overview
  • Request Method: POST
  • Request URL: /api/surveys/{survey_id}/analytics/aggs

Request Parameters

Parameter NameTypeLocationDescriptionExample Value
survey_idintegeruriSurvey ID292192
question_idsarray[string]bodyQuestion ID list, from Get Survey Details["q-1-kEFC"]

Response Example

{
"code": "OK",
"error": {
"type": ""
},
"data": {
"aggregations": {
"q-1-kEFC": { // Question ID
"doc_count": 1, // Total count for current question
"filtered": {
"buckets": [
{
"doc_count": 1, // Count for current option
"key": "o-101-EFGH" // Option ID
}
],
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0
}
}
},
"total": 1
},
"request_id": "1fb7b924-acb4-4595-a083-86c9b199c1d7"
}