萤石云拉流接口主要支持以下四种协议:
Open
,不是指协议是开放的,指的是(萤石云)开放平台的协议。实际上除了对协议URL的定义外,找不到任何资料萤石云的工单系统挺醉人的,我提交了两个工单,大意都是问EZOPEN协议支不支持Java,一个工单的回复是JavaScript马上就支持了,另一个工单的回复是C++支持。
萤石云的HTTP接口主要用于摄像头的控制与帐号的管理
部分接口调用示例:
### 获取令牌
POST https://open.ys7.com/api/lapp/token/get
Content-Type: application/x-www-form-urlencoded
appKey=xxx&appSecret=yyy
> {%
client.assert(response.body["code"] === "200", "Failed");
client.global.set("token", response.body["data"]["accessToken"]);
%}
### 获取直播列表
POST https://open.ys7.com/api/lapp/live/video/list
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}
### 获取临时直播地址
POST https://open.ys7.com/api/lapp/live/address/limited
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&channelNo=1&expireTime=300
### 启用直播
POST https://open.ys7.com/api/lapp/live/video/open
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&source=C58828827:1
### 禁用直播
POST https://open.ys7.com/api/lapp/live/video/close
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&source=C58828827:1
### 获取直播地址
POST https://open.ys7.com/api/lapp/live/address/get
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&source=C58828827:1
### 获取直播地址(ws格式)
POST https://open.ys7.com/api/lapp/live/ws/address/get
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&source=C58828827:1
### 获取用户流量消耗
POST https://open.ys7.com/api/lapp/traffic/user/total
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}
### 抓拍图片
POST https://open.ys7.com/api/lapp/device/capture
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&channelNo=1
### 获取设备列表
POST https://open.ys7.com/api/lapp/device/list
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}
### 获取摄像头列表
POST https://open.ys7.com/api/lapp/camera/list
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}
### 获取好友列表
POST https://open.ys7.com/api/lapp/friend/list
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}
### 获取共享列表
POST https://open.ys7.com/api/lapp/share/list
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}
### 获取设备状态
POST https://open.ys7.com/api/lapp/device/status/get
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827
### 获取设备信息
POST https://open.ys7.com/api/lapp/device/info
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827
### 获取设备功能列表
POST https://open.ys7.com/api/lapp/device/capacity
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827
### 遮蔽镜头
POST https://open.ys7.com/api/lapp/device/scene/switch/set
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&enable=0
### 云台上移
POST https://open.ys7.com/api/lapp/device/ptz/start
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&channelNo=1&direction=0&speed=1
### 云台下移
POST https://open.ys7.com/api/lapp/device/ptz/start
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&channelNo=1&direction=1&speed=0
### 云台左移
POST https://open.ys7.com/api/lapp/device/ptz/start
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&channelNo=1&direction=2&speed=2
### 云台右移
POST https://open.ys7.com/api/lapp/device/ptz/start
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827&channelNo=1&direction=3&speed=2
### 获取设备报警信息列表
POST https://open.ys7.com/api/lapp/alarm/list
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827
### 获取云存储服务状态与信息
POST https://open.ys7.com/api/lapp/cloud/storage/device/info
Content-Type: application/x-www-form-urlencoded
accessToken={{token}}&deviceSerial=C58828827