Skip to main content
Version: latest

获取问卷聚合数据

重要提示

该功能为 尊享版 付费功能,如未升级,请先 升级 后再使用

接口概述

  • 功能:获取问卷聚合数据
  • 请求方式:POST
  • 请求地址:/api/surveys/{survey_id}/report_aggs?appid={appid}&access_token={access_token}

请求参数

参数名类型必须参数位置描述示例值
survey_idintegeruri问卷ID292192
fromintegerbody开始时间(时间戳,单位秒)1730190699
tointegerbody结束时间(时间戳,单位秒)1730192699
intervalstringbody答题趋势间隔 ("1w", "1d", "12h", "3h", "1h", "10m", "5m", "1m")1d

响应参数

参数名类型描述
duration_avginteger平均答题时长
statusarray答题状态统计
status[0].keystring状态("valid", "invalid")
status[0].countinteger数量
channelarray渠道统计
channel[0].keystring渠道("unknown", "wx")
channel[0].countinteger数量
locationarray地域统计
location[0].keystring国家
location[0].countinteger数量
location[0].childrenarray下层地域统计
ua_devicearray设备统计
ua_device[0].keystring设备("unknown", "Computer")
ua_device[0].countinteger数量
ua_osarray操作系统统计
ua_os[0].keystring操作系统("unknown", "MacOS")
ua_os[0].countinteger数量
trendsarray答题趋势
trends[0].keystring时间戳,单位毫秒
trends[0].countinteger数量

响应示例

{
"error": {
"type": ""
},
"data": {
"duration_avg": 11,
"status": [
{
"key": "valid",
"count": 5
},
{
"key": "invalid",
"count": 1
}
],
"channel": [
{
"key": "unknown",
"count": 5
},
{
"key": "wx",
"count": 1
}
],
"location": [
{
"key": "中国",
"count": 6,
"children": [
{
"key": "广东省",
"count": 6,
"children": [
{
"key": "深圳市",
"count": 5,
"children": []
},
{
"key": "广州市",
"count": 1,
"children": []
}
]
}
]
}
],
"ua_device": [
{
"key": "unknown",
"count": 4
},
{
"key": "Computer",
"count": 2
}
],
"ua_os": [
{
"key": "unknown",
"count": 4
},
{
"key": "MacOS",
"count": 2
}
],
"trends": [
{
"key": "1730044800000",
"count": 4
},
{
"key": "1730131200000",
"count": 2
}
]
},
"code": "OK",
"request_id": "lVX5tIxeZlZ6Wov020241029164207"
}