Appearance
获取所有用户观看数据
请求路径
- 请求方式:
POST - 请求头:
Content-Type:application/json - 接口地址:
https://gateway.nuoyunapi.com/Api/RoomRounds/getAccountUserDurationList/2.0.0 - 频率限制:
10秒1000次
请求参数
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| page | 是 | integer | 第几页,最小值为 1 |
| page_size | 是 | integer | 每页数量,最小值为 1,最大值为 500 |
| sort | 是 | string | 按记录 ID 排序,可选值:asc、desc |
| update_time_start | 否 | integer | 记录更新时间范围开始值,10 位 Unix 秒级时间戳 |
| update_time_end | 否 | integer | 记录更新时间范围结束值,10 位 Unix 秒级时间戳 |
| wechat_user_space_id | 否 | integer | 用户 ID |
| room_id_list | 否 | array<integer> | 直播间 ID 列表,最多 10 个 |
| wechat_user_space_id_list | 否 | array<integer> | 用户 ID 列表,最多 500 个 |
update_time_start 和 update_time_end 需要同时大于 0 才会按更新时间筛选,筛选范围包含开始时间和结束时间。
请求示例
json
{
"page": 1,
"page_size": 10,
"update_time_start": 1784736000,
"update_time_end": 1784822399,
"wechat_user_space_id_list": [10001, 10002],
"room_id_list": [20001],
"sort": "desc"
}响应参数
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| code | 是 | integer | 状态码:200-成功,400-失败 |
| msg | 是 | string | 提示信息 |
| data | 是 | object | 观看数据 |
data 参数结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| total | 是 | integer | 符合条件的记录总数 |
| list | 是 | array | 用户观看时长列表 |
list 参数结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| room_id | 是 | integer | 直播间 ID |
| wechat_user_space_id | 是 | integer | 用户 ID |
| wechat_user_name | 是 | string | 用户昵称 |
| wechat_user_photo | 是 | string | 用户头像 |
| stay_duration | 是 | integer | 在线时长,单位:秒 |
| ip | 是 | string | 最近访问 IP |
| third_uuid | 是 | string | 三方系统用户 ID |
| third_wechat_info | 是 | object | 第三方微信信息 |
| live_duration | 是 | integer | 直播时长,单位:秒 |
| playback_duration | 是 | integer | 回放时长,单位:秒 |
| channel_info | 是 | object | 门店渠道归属信息 |
| invited_wechat_user_space_id | 是 | integer | 邀请用户 ID |
| invited_name | 是 | string | 邀请用户昵称 |
| first_visit_time | 是 | string | 初次访问时间 |
| last_visit_time | 是 | string | 最后访问时间 |
| area | 是 | string | IP 所属地区 |
| device | 是 | string | 使用设备 |
| updated_time | 是 | integer | 本条观看汇总记录的更新时间,10 位 Unix 秒级时间戳 |
updated_time 逐条取自对应观看汇总记录,每条记录可能不同;该字段不是统一的接口响应时间,也不是请求参数 update_time_end 的回显值。
third_wechat_info 数据结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| authorizer_appid | 是 | string | 第三方公众号 AppID |
| openid | 是 | string | 第三方 OpenID |
| unionid | 是 | string | 第三方 UnionID |
channel_info 数据结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| channel_id | 是 | integer | 门店 ID |
| channel_name | 是 | string | 门店名称 |
| store_id | 是 | string | 门店编码 |
响应示例
json
{
"data": {
"total": 2,
"list": [
{
"room_id": 20001,
"wechat_user_space_id": 10001,
"wechat_user_name": "示例用户A",
"wechat_user_photo": "https://example.com/avatar-a.png",
"stay_duration": 392,
"ip": "192.168.x.x",
"third_uuid": "third_user_10001",
"third_wechat_info": {},
"live_duration": 300,
"playback_duration": 92,
"channel_info": {
"channel_id": 30001,
"channel_name": "示例门店",
"store_id": "store_10001"
},
"invited_wechat_user_space_id": 0,
"invited_name": "",
"first_visit_time": "2026-07-23 10:00:00",
"last_visit_time": "2026-07-23 10:06:32",
"device": "iOS",
"area": "示例地区",
"updated_time": 1784772392
},
{
"room_id": 20001,
"wechat_user_space_id": 10002,
"wechat_user_name": "示例用户B",
"wechat_user_photo": "https://example.com/avatar-b.png",
"stay_duration": 461,
"ip": "192.168.x.x",
"third_uuid": "third_user_10002",
"third_wechat_info": {},
"live_duration": 0,
"playback_duration": 461,
"channel_info": {},
"invited_wechat_user_space_id": 0,
"invited_name": "",
"first_visit_time": "2026-07-23 10:10:00",
"last_visit_time": "2026-07-23 10:17:41",
"device": "Android",
"area": "示例地区",
"updated_time": 1784773061
}
]
},
"msg": "Success",
"code": 200
}