包含系统信息模块,提供获取公共信息、确认SRT是否启用、导航栏菜单等功能。
文章目录
获取公共信息
API说明
获取设备公共信息:编码/解码、Logo图标地址、设备名称、序列号
Request
- Method: GET/POST
- URL:
info/get.json
- Headers:
- 提交参数: 无
Response
- Body
{
"result": "ok",
"data": {
"copyright": "Decoder",
"logosrc": "logo.png",
"name": "Decoder",
"serialNumber": "000000000"
}
}
返回说明:
字段 | 类型 | 说明 |
---|---|---|
copyright | 字符串 | 设备型号?版权描述? |
logosrc | 字符串 | 设备Logo文件名,对应访问地址"/img/"+logosrc,如/img/logo.png |
name | 字符串 | 设备名称,新版本将支持用户修改。 |
serialNumber | 字符串 | 设备序列号 |
调用测试:
http://192.168.2.123/api/info/get.json
查询SRT是否启用(新版本不可用)
API说明
查询SRT功能是否启用
Request
- Method: GET/POST
- URL:
info/checkSRT.json
- Headers:
- 提交参数: 无
Response
- Body
{`` "result": "ok",`` "data": {`` "enable": 1`` }``}
返回说明:
字段 | 类型 | 说明 |
---|---|---|
enable | 数值 | 1:启用;0:未启用 |
调用测试:
http://192.168.2.123/api/info/checkSRT.json
获取导航栏菜单(新版本不可用)
API说明
获取支持导航栏菜单数据–该方法有问题
Request
- Method: GET/POST
- URL:
info/nav.json
- Headers:
- 提交参数: 无
Response
- Body
{`` "result": "ok",`` "data": {`` "main_nav": [`` {`` "href": "index.html",`` "en_text": "Media",`` "zh_text": "媒体"`` },`` {`` "href": "sip_GB.html",`` "en_text": "SIP/GB28181",`` "zh_text": "SIP/GB28181"`` },`` {`` "href": "flowservice.html",`` "en_text": "Stream",`` "zh_text": "流服务"`` },`` {`` "href": "networksetup.html",`` "en_text": "Network",`` "zh_text": "网络"`` }`` ],`` "sys_nav": [`` {`` "href": "users.html",`` "en_text": "User Manage",`` "icons": "fa fa-user-md",`` "zh_text": "用户管理"`` },`` {`` "href": "system-time.html",`` "en_text": "System Time",`` "icons": "glyphicon glyphicon-time",`` "zh_text": "系统时间"`` },`` {`` "type": "reset",`` "en_text": "Reset",`` "icons": "fa fa-refresh",`` "zh_text": "快速复位"`` },`` {`` "type": "reboot",`` "en_text": "Reboot",`` "icons": "glyphicon glyphicon-repeat",`` "zh_text": "设备重启"`` },`` {`` "type": "restore",`` "en_text": "Restore",`` "icons": "glyphicon glyphicon-info-sign",`` "zh_text": "恢复出厂设置"`` },`` {`` "href": "firmwareudp.html",`` "en_text": "Firmware",`` "icons": "fa fa-hdd-o",`` "zh_text": "固件升级"`` }`` ]`` }``}
调用测试:
http://192.168.2.123/api/info/nav.json