翻译跟原始页面比较起来显得有些陈旧,所以可能失效。 查看更新

这是本文档旧的修订版!


Ceiba2 API集成基本流程

  1. 以下所有操作需要设备在线All the following steps need the device to be online
  2. 你可以使用Ceiba客户端来检查设备在线状态和查看设备序列号You can use the ceiba client to check the device's online status and the device's Serial No.
  3. 你可以使用Ceiba的web客户端来检查API是否工作正常You can use the web ceiba to check if the API work normally if you received an error

1. 获取Key

Request URL:

  http://IP:12056/api/v1/basic/key?username=username&password=password

Return:

  {"data":{"key":"zT908g2j9ng4xe0Nr2n1hbSblgS24wXjZV3o9wsVfNq0q3nEdl%2Fw%3D%3D"},"errorcode":200}

2. 获取实时预览端口

Request URL:

  http://IP:12056/api/v1/basic/live/port?key=zT908g2j9ng4xe0Nr2n1hbSblgS24wXjZV3o9wsVfNq0q3nEdl%2Fw%3D%3D

Return:

  {"data":[{"port":12060},{"port":12061},{"port":12062},{"port":12063}],"errorcode":200}

3. 获取实时预览URL

Request URL:

  http://IP:12056/api/v1/basic/live/video?key=zT908g2j9ng4xe0Nr2n1hbSblgS24wXjZV3o9wsVfNq0q3nEdl%2Fw%3D%3D&terid=0089000EFD&chl=1&audio=1&st=0&port=12060&dt=mdvr

Return:

  {"data":{"url":"http://IP:12060/live.flv?devid=0089000EFD&chl=1&st=0&isaudio=1&dt=mdvr"},"errorcode":200}\\

4. 打开实时预览

  使用demo player, 或者VLC播放器或者其他支持流媒体播放的视频播放器打开上述URL来开始实时预览;

1. 查询录像列表

Request URL:

  http://IP:12056/api/v1/basic/record/filelist?key=zT908g2j9ng4xe0Nr2n1hbSblgS24wXjZV3o9wsVfNq0q3nEdl%2Fw%3D%3D&terid=00880038EE&starttime=2019-04-18%2000:00:00&endtime=2019-04-19%2023:59:59&chl=1,2,3,4&ft=0&st=1

Return:

  {"data":[{"name":"0-58-0","filetype":1,"chn":2,"starttime":"2019-04-18 00:14:42","endtime":"2019-04-18 00:14:42"},{"name":"0-58-1","filetype":1,"chn":2,"starttime":"2019-04-18 00:14:42","endtime":"2019-04-18 00:14:48"},{"name":"0-60-0","filetype":1,"chn":3,"starttime":"2019-04-18 00:14:42","endtime":"2019-04-18 00:14:48"},{"name":"0-61-0","filetype":1,"chn":4,"starttime":"2019-04-18 00:14:42","endtime":"2019-04-18 00:14:48"},{"name":"0-63-0","filetype":1,"chn":1,"starttime":"2019-04-18 00:14:42","endtime":"2019-04-18 00:14:48"}],"errorcode":200}

2. 获取回放URL

Request URL:

  http://IP:12056/api/v1/basic/record/video?key=zT908g2j9ng4xe0Nr2n1hbSblgS24wXjZV3o9wsVfNq0q3nEdl%2Fw%3D%3D&terid=00880038EE&starttime=2019-04-18%2000:14:42&endtime=2019-04-18%2000:14:48&chl=1

Return:

  {"data":{"url":"http://IP:8090/play/00880038EE/1/20190418001442_20190418001448_main.m3u8"},"errorcode":200}

3. 回放

  使用demo player, 或者VLC播放器或者其他支持流媒体播放的视频播放器打开上述URL来开始实时回放;
  • zh/public/ceiba2/api.1630000767.txt.gz
  • 最后更改: 2021/08/26 19:59
  • europe