跳到主要内容
版本:3.4.0

查询媒体日志记录

GET /strm/log

本接口用于查询媒体活动的日志记录。服务默认保存7天的媒体活动记录。

请求

GET https://n11.gratour.info:7011/strm/log?startTime=2022-07-15 00:00:00&endTime=2022-07-16 00:00:00&__limit=20&__page=1
Authorization: Basic YWRtaW46YWRtaW4

查询参数

参数数据类型必要说明
startTimestringY事件时间范围的开始时间。格式:yyyy-MM-dd HH:mm:ss
endTimestringY事件时间范围的结束时间(结果数据不含此时间点的数据)。格式:yyyy-MM-dd HH:mm:ss
simNostring终端识别号。
chanIdint音视频逻辑通道号。参见JT/T 1078标准定义的车载视频逻辑通道号定义表。
liveboolean是否实时音视频。不指定时,同时查询实时音视频和远程录像回放。
evtTypstring事件类型,为下列字符串之一:
  • open: 打开媒体通道
  • id: 媒体源码流格式已经识别
  • ready: 客户端媒体流已经准备好
  • reqClosed: 媒体请求已经关闭
  • srcClosed: 媒体源已经关闭
__limitintY分页每页记录数,必须大于等于1,小于等于2000
__pageintY分页的第几页,从1开始。

应答实体

{
"data": [
{
"time": 1657852655000,
"simNo": "13305224639",
"chanId": 1,
"live": true,
"reqId": "Mn9C74azS3ipzyV84uCK_A",
"evtTyp": "reqClosed",
"evtData": "closeCause=1\ncloseReason=Client request close.\nbyteRate=67876\nclntConnTm=1657852511088"
},
{
"time": 1657852655000,
"simNo": "13305224639",
"chanId": 2,
"live": true,
"reqId": "m8Fyj3RrT4uSJ9DvV-Jr6Q",
"evtTyp": "reqClosed",
"evtData": "closeCause=1\ncloseReason=Client request close.\nbyteRate=67688\nclntConnTm=1657852510913"
},
{
"time": 1657852655000,
"simNo": "13305224639",
"chanId": 3,
"live": true,
"reqId": "f4iOpsFYS2-ueFsJ61jx3A",
"evtTyp": "reqClosed",
"evtData": "closeCause=1\ncloseReason=Client request close.\nbyteRate=67933\nclntConnTm=1657852510986"
},
{
"time": 1657852655000,
"simNo": "13305224639",
"chanId": 4,
"live": true,
"reqId": "JlMXZdYqTyyXixBx5eQWfQ",
"evtTyp": "reqClosed",
"evtData": "closeCause=1\ncloseReason=Client request close.\nbyteRate=67878\nclntConnTm=1657852510837"
},
{
"time": 1657852594000,
"simNo": "13305292361",
"chanId": 1,
"live": true,
"reqId": "E7-bqKIsTzuyDNPnurS45w",
"evtTyp": "reqClosed",
"evtData": "closeCause=6\ncloseReason=Terminal media data timeout.\nbyteRate=0\nclntConnTm=1657852474309"
},
{
"time": 1657852594000,
"simNo": "13305292361",
"chanId": 2,
"live": true,
"reqId": "ceR5U9GmSrKp5PhXUQlohg",
"evtTyp": "reqClosed",
"evtData": "closeCause=6\ncloseReason=Terminal media data timeout.\nbyteRate=0\nclntConnTm=1657852474243"
},
{
"time": 1657852594000,
"simNo": "13305292361",
"chanId": 3,
"live": true,
"reqId": "Mmfv0iGiS7OVECM8QMtZrQ",
"evtTyp": "reqClosed",
"evtData": "closeCause=6\ncloseReason=Terminal media data timeout.\nbyteRate=0\nclntConnTm=1657852474180"
},
{
"time": 1657852594000,
"simNo": "13305292361",
"chanId": 4,
"live": true,
"reqId": "Hvnvnhl1Q0mJzdk7Z3Tq3A",
"evtTyp": "reqClosed",
"evtData": "closeCause=6\ncloseReason=Terminal media data timeout.\nbyteRate=0\nclntConnTm=1657852474119"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 1,
"live": true,
"reqId": "Mn9C74azS3ipzyV84uCK_A",
"evtTyp": "ready",
"evtData": "playUrl=wss://n11.gratour.info:7011/w/13305224639_1_1?a=n4uNZ_oU&b=7z8tBT6zWUi-vQM8gZH-SsEoW13o7-zzquRuNsYD0i6sWsCAoEfCcfVGt-SmtqNQdAVT0QsnhC4pbKxhPiHI3Akw8sds7Qp1RgY\nmediaTyp=av\nvFmt=H.264 (2)\nvRez=704x576"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 1,
"live": true,
"reqId": "Mn9C74azS3ipzyV84uCK_A",
"evtTyp": "open",
"evtData": "firstReq=true\ncodeStrm=1\nliveDataTyp=0\nfmt=0\nconnIdx=0\nclientData=appId=micro-gnss\ncb=https://n11.gratour.info:9388/v1/strm_serv\nuser= (30)\nctrl=true"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 1,
"live": true,
"reqId": "Mn9C74azS3ipzyV84uCK_A",
"evtTyp": "id",
"evtData": ""
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 2,
"live": true,
"reqId": "m8Fyj3RrT4uSJ9DvV-Jr6Q",
"evtTyp": "ready",
"evtData": "playUrl=wss://n11.gratour.info:7011/w/13305224639_2_1?a=Z02DGOtw&b=CVP7xCykJkCXpvl9U_ygFcQGcm7dShw6_3ZiWtWgG67USHnT52NhAPr2VjsXitPrCKqZjMlCdoiQpdyuj0YaE3Hozndc-MYAE72\nmediaTyp=av\nvFmt=H.264 (2)\nvRez=704x576\naFmt=G.711A (6)\nhisiHeader=true\naudioBitrate=64000\ndefaultBitrate=true"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 2,
"live": true,
"reqId": "m8Fyj3RrT4uSJ9DvV-Jr6Q",
"evtTyp": "open",
"evtData": "firstReq=true\ncodeStrm=1\nliveDataTyp=0\nfmt=0\nconnIdx=0\nclientData=appId=micro-gnss\ncb=https://n11.gratour.info:9388/v1/strm_serv\nuser= (30)\nctrl=true"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 2,
"live": true,
"reqId": "m8Fyj3RrT4uSJ9DvV-Jr6Q",
"evtTyp": "id",
"evtData": ""
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 3,
"live": true,
"reqId": "f4iOpsFYS2-ueFsJ61jx3A",
"evtTyp": "open",
"evtData": "firstReq=true\ncodeStrm=1\nliveDataTyp=0\nfmt=0\nconnIdx\u003d0\nclientData=appId=micro-gnss\ncb=https://n11.gratour.info:9388/v1/strm_serv\nuser= (30)\nctrl=true"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 3,
"live": true,
"reqId": "f4iOpsFYS2-ueFsJ61jx3A",
"evtTyp": "ready",
"evtData": "playUrl=wss://n11.gratour.info:7011/w/13305224639_3_1?a=OlR_Th3k&b=uYU43Uis2Tc8RD1u8iUYr9fVlsh-l8ThJ_Ha_cJ4imws_VCLsa1NJrxyQ7uYrIFqpc9LEBgbKz1KK3cJLjNt6UOisk9L3iTPx3F\nmediaTyp=av\nvFmt=H.264 (2)\nvRez=704x576\naFmt=G.711A (6)\nhisiHeader=true\naudioBitrate=64000\ndefaultBitrate=true"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 3,
"live": true,
"reqId": "f4iOpsFYS2-ueFsJ61jx3A",
"evtTyp": "id",
"evtData": ""
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 4,
"live": true,
"reqId": "JlMXZdYqTyyXixBx5eQWfQ",
"evtTyp": "ready",
"evtData": "playUrl=wss://n11.gratour.info:7011/w/13305224639_4_1?a=UCdbq280&b=JAKSTg6Zvm9pBxvtFR-SMM3Ar9gQL9rCb9ApN3FezOU-ochLS137S0ZaHl0BL8bzq-zVznrE6prFz9Dk3GvVP7SdtNmNCjqMA4i\nmediaTyp=av\nvFmt=H.264 (2)\nvRez=704x576"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 4,
"live": true,
"reqId": "JlMXZdYqTyyXixBx5eQWfQ",
"evtTyp": "open",
"evtData": "firstReq=true\ncodeStrm=1\nliveDataTyp=0\nfmt=0\nconnIdx=0\nclientData=appId=micro-gnss\ncb=https://n11.gratour.info:9388/v1/strm_serv\nuser= (30)\nctrl=true"
},
{
"time": 1657852511000,
"simNo": "13305224639",
"chanId": 4,
"live": true,
"reqId": "JlMXZdYqTyyXixBx5eQWfQ",
"evtTyp": "id",
"evtData": ""
}
],
"count": 20,
"errCode": 0,
"message": "成功。"
}

应答实体属性

属性数据类型必要说明
errCodeintY错误码。
messagestringY错误信息。
dataarray[StrmLog]返回的结果对象数组。元素为StrmLog类型,见下
countint返回的记录数

StrmLog

属性数据类型必要说明
timelongY事件发生的时间,Epoch milli-seconds
simNostringY终端识别号
chanIdintY音视频逻辑通道号。参见JT/T 1078标准定义的车载视频逻辑通道号定义表
livebooleanY是否实时音视频
reqIdstring请求ID。事件无请求ID时,为空字符串或null,或无此属性
evtTypstringY事件类型,为下列字符串之一:
  • open: 打开媒体通道
  • id: 媒体源码流格式已经识别
  • ready: 客户端媒体流已经准备好
  • reqClosed: 媒体请求已经关闭
  • srcClosed: 媒体源已经关闭
evtDatastring事件的明细数据。内容为以\n换行符分隔的键值对。键值对以=分隔。