N
O
D
E
M
E
D
I
A
Thinking
首页
产品
文档
博客
订单
文档
查询记录
2026年 5月 20日 下午3:36
**简要描述:** - 记录查询接口,只保存有效记录。播放不存在的流等情况不记录。 - 需更新到v3.16.3 - 需在config.ini 的[log]分段设置 log_todb =1 开启,默认是关闭的 **请求URL:** - ` http://xx.com/api/logs/{streamType}/{startTime}/{endTime} ` **请求方式:** - GET **参数:** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |streamType |是 |string |流类型 ,all/push/pull| |startTime |是 |number | 开始时间 毫秒UNIX时间戳 | |endTime |是 |number | 结束时间 毫秒UNIX时间戳 | **返回示例** ``` { "code": 200, "error": "", "data": [{ "id": "9z3toxi6tds5plida48rxhn0r4sogldb", "ip": "127.0.0.1:40558", "protocol": "rtmp", "stream": "/live/tcl_265", "traffic": 0, "createTime": 1660310956802, "closeTime": 0, "isPublisher": true }, { "id": "is707dyo1856cwg83bn9ss03wso6ux44", "ip": "127.0.0.1:40560", "protocol": "rtmp", "stream": "/live/bbb", "traffic": 0, "createTime": 1660310956808, "closeTime": 0, "isPublisher": true }, { "id": "zr4p8e2a8urhg5kvz7ay6xpca7140r2e", "ip": "127.0.0.1:40562", "protocol": "rtmp", "stream": "/live/tcl_264", "traffic": 0, "createTime": 1660310956814, "closeTime": 0, "isPublisher": true }, { "id": "ia4b5zk4yim6tov8imcynqhvhzd7kr0q", "ip": "127.0.0.1:40564", "protocol": "rtmp", "stream": "/live/192168000112_102", "traffic": 0, "createTime": 1660310958103, "closeTime": 0, "isPublisher": true }, { "id": "4bgy65itwdsrgrv7vvq3jlzshpjhyeq7", "ip": "192.168.0.6:63144", "protocol": "http", "stream": "/live/tcl_265", "traffic": 457215, "createTime": 1660310982640, "closeTime": 1660310988005, "isPublisher": false }, { "id": "8ei4104eltv2i337jxnz51ux31z31mzn", "ip": "192.168.0.6:58354", "protocol": "http", "stream": "/live/tcl_265", "traffic": 2070875, "createTime": 1660311010780, "closeTime": 1660311020075, "isPublisher": false }] } ``` **返回参数说明** |参数名|类型|说明| |:----- |:-----|----- | |id |string |流id | |ip |string |客户端ip | |protocol |string |流协议 | |stream |string |流名称| |traffic |number |流量,单位字节,流结束时才统计,如果为0,表示流还在进行中 | |createTime|number|流创建时间| |closeTime|number|流结束时间| |isPublisher|boolean|流类型|
嘿,我是小R,需要帮助随时找我哦
QQ客服:281269007
邮件支持
扫码加微信
回到顶部