简要描述:

  • 获取机构或直播室回看列表,场次按开始时间倒序, 场次内录像片段按时间顺序

请求URL:

  • /zhibo/recordings 获取机构回看列表
  • /zhibo/recordings?roomId={roomId} 获取机构的单个直播室回看列表

HTTP请求方法:

  • GET

请求头:

NA

URL请求参数:

名称 类型 是否必须 描述
roomId String 直播间主键pid
limit int 每页记录数. 默认值为20.
offset int 上一页最后一条记录号, offset必须是limit的倍数, 第一页为0. 当前页码可以通过offset/limit + 1来获得. 默认值为0.

请求体参数:

NA

返回参数说明:

返回200的成功的响应体:

参数名 类型 说明
datas[].roomName String 直播室名称
datas[].sessionName String 直播场次名称
datas[].startTime String 直播场次开始时间
datas[].endTime String 直播场次结束时间
datas[].recordingFiles Object 回看文件信息
datas[].recordingFiles[].filePath String 回看文件地址,如:https://ljliveo-test.yxt.com/play-test.yunxuetang.com.cn/app90/1e428fce90864cb588364a8c49fa7c11/recording_20161230164845_20161230164849.mp4
datas[].recordingFiles[].duration long 录像时长,单位:秒(s)
datas[].recordingFiles[].startTime String 录像开始时间,如:2016-12-29 09:21:33
datas[].recordingFiles[].endTime String 录像开始时间,如:2016-12-29 09:23:31

示例:

请求:
GET https://api-zhibo.yxt.com/v1/zhibo/recordings
Content-Type: application/json;charset=UTF-8
appkey: xxxxxxxxxxxxxxxxxxxxx
nonce: xxxx
timestamp: xxxxxxxxxx
signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
source: xxxx

请求体:
NA

正确时返回:
状态值: HTTP/1.1 200 OK.
Content-Type: application/json;charset=UTF-8

  1. {
  2. "datas": [
  3. {
  4. "roomName": "公开课外部讲师",
  5. "sessionName": "公开课外部讲师",
  6. "startTime": "2017-05-19 20:58:00.0",
  7. "endTime": "2017-05-21 00:00:09.0",
  8. "recordingFiles": [
  9. {
  10. "filePath": "https://ljliveo-test.yxt.com/play-test.yunxuetang.com.cn/app90/2a2c220f10e247d5bbd796e9066ed55a/recording_20170519205805_20170519205809.mp4",
  11. "duration": 4,
  12. "startTime": "2017-05-19 20:58:05",
  13. "endTime": "2017-05-19 20:58:09"
  14. }
  15. ]
  16. },
  17. {
  18. "roomName": "公开课外部讲师",
  19. "sessionName": "公开课外部讲师",
  20. "startTime": "2017-05-19 16:38:15.0",
  21. "endTime": "2017-05-19 19:13:40.0",
  22. "recordingFiles": [
  23. {
  24. "filePath": "https://ljliveo-test.yxt.com/play-test.yunxuetang.com.cn/app90/2a2c220f10e247d5bbd796e9066ed55a/recording_20170519163817_20170519163822.mp4",
  25. "duration": 5,
  26. "startTime": "2017-05-19 16:38:17",
  27. "endTime": "2017-05-19 16:38:22"
  28. },
  29. {
  30. "filePath": "https://ljliveo-test.yxt.com/play-test.yunxuetang.com.cn/app90/2a2c220f10e247d5bbd796e9066ed55a/recording_20170519170233_20170519170520.mp4",
  31. "duration": 167,
  32. "startTime": "2017-05-19 17:02:33",
  33. "endTime": "2017-05-19 17:05:20"
  34. },
  35. {
  36. "filePath": "https://ljliveo-test.yxt.com/play-test.yunxuetang.com.cn/app90/2a2c220f10e247d5bbd796e9066ed55a/recording_20170519184623_20170519191340.mp4",
  37. "duration": 1637,
  38. "startTime": "2017-05-19 18:46:23",
  39. "endTime": "2017-05-19 19:13:40"
  40. }
  41. ]
  42. },
  43. {
  44. "roomName": "公开课外部讲师",
  45. "sessionName": "公开课外部讲师",
  46. "startTime": "2017-05-19 12:03:29.0",
  47. "endTime": "2017-05-19 12:11:54.0",
  48. "recordingFiles": [
  49. {
  50. "filePath": "https://ljliveo-test.yxt.com/play-test.yunxuetang.com.cn/app90/2a2c220f10e247d5bbd796e9066ed55a/recording_20170519120348_20170519121156.mp4",
  51. "duration": 488,
  52. "startTime": "2017-05-19 12:03:48",
  53. "endTime": "2017-05-19 12:11:56"
  54. }
  55. ]
  56. }
  57. ],
  58. "paging": {
  59. "limit": 20,
  60. "offset": 0,
  61. "pages": 1,
  62. "count": 3
  63. }
  64. }

错误时返回:

状态值: HTTP/1.1 400 Bad Request

  1. {
  2. "error": {
  3. "key": "global.noprivilege",
  4. "message": "No privilege."
  5. }
  6. }

错误代码列表:

格式: key=状态码;message
apis.auth.client.status.invalid=400;Client Org status is invalid.
apis.zhibo.orgadmin.validation.service.expired=400;Service is not active.