企播 activity 频道微服务接口文档
HTTP接口文档
频道集成信息接口
GET /activity/api/integrated_info?actid=xxxx
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道HashID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误信息 | string |
| name | 频道名称 | string |
| description | 频道描述 | string |
| visible | 频道是否可进 | bool |
| start_at | 活动开始时间 | datetime |
| live | 频道直播状态 | bool |
| launchl | 手机版频道观看页启动界面开关 | bool |
| launch_img_url | 手机版频道观看启动界面图 | string |
| bgimg_url | 手机版频道观看页启动界面开关 | bool |
| icon_url | 手机版频道观看启动界面图 | string |
| coverimg_url | 频道封面图片 | string |
| playback_video_id | 回放视频ID | int |
| playback_available | 回放开关 | bool |
| playback__autoplay | 自动播放开关 | bool |
| announ_visible | 滚动公告是否显示 | bool |
| announ_content | 滚动公告内容 | string |
| announ_color | 滚动公告文字颜色 | string |
| ad_video_id | 广告视频ID | int |
| ad_open | 广告开关 | bool |
| countdown_datetime | 倒计时时间 | string |
| countdown_tips | 倒计时提示语 | string |
| countdown_enable | 倒计时开关 | bool |
| social_title | 分享标题 | string |
| social_preview | 分享内容 | string |
| social_weibo | 微博开关 | bool |
| social_wechat | 微信开关 | bool |
| social_twitter | 推特开关 | bool |
| social_google_plus | google+开关 | bool |
| social_facebook | facebook开关 | bool |
| social_linkedin | linkedin开关 | bool |
| addresses | 直播地址列表 | slice |
| addresses.address | 直播地址 | string |
| addresses.protocol | 直播协议 | string |
| addresses.resolution | 直播分辨率 | string |
创建频道
POST /activity/api/create
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| name | 频道名称 | string | 必填 |
| description | 频道描述 | string | 选填,默认为空 |
| visible | 观众是否可见 | bool | 选填,默认不可见 |
| order | 控制台排序 | int | 选填,默认为0 |
| start_at | 直播开始时间,形如: 2006-01-02 15:04:05,可为空 |
string | 选填,默认为当前时间 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| activityid | 频道hashID | string |
| stream_url | 推流地址 | string |
| stream_key | 推流key | string |
| watch_url | 观看页地址 | string |
获取频道列表
GET /activity/api/list
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| page | 页数,从 1 开始 | int | 选填,默认为1 |
| size | 每页个数 | int | 选填,默认为15 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| total_num | 频道总数 | int |
| total_page | 频道总页码 | int |
| page_num | 页码 | int |
| page_size | 页面大小 | int |
| result | 频道列表 | object array |
| result.id | 频道ID | string |
| result.name | 频道名称 | string |
| result.description | 频道描述 | string |
| result.visible | 频道是否可见 | bool |
| result.created | 频道创建时间 | string |
| result.update | 频道更新时间 | string |
| result.order | 频道优先级 | int |
| result.coverimg | 频道封面 | string |
| result.start_at | 频道开始时间 | string |
| result.live_type | 创建直播形式,0为频道,1为网页直播工具 | int |
| result.toolid | 网页直播工具HashID,若为频道直播,则该字段为0 | string |
搜索频道列表
GET /activity/api/search
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| page | 页数,从 1 开始 | int | 选填,默认为1 |
| size | 每页个数 | int | 选填,默认为15 |
| name | 频道名 | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| total_num | 频道总数 | int |
| total_page | 频道总页码 | int |
| page_num | 页码 | int |
| page_size | 页面大小 | int |
| result | 频道列表 | object array |
| result.id | 频道ID | string |
| result.name | 频道名称 | string |
| result.description | 频道描述 | string |
| result.visible | 频道是否可见 | bool |
| result.created | 频道创建时间 | string |
| result.update | 频道更新时间 | string |
| result.order | 频道优先级 | int |
| result.coverimg | 频道封面 | string |
| result.start_at | 频道开始时间 | string |
| result.live_type | 创建直播形式,0为频道,1为网页直播工具 | int |
| result.toolid | 网页直播工具HashID,若为频道直播,则该字段为0 | string |
获取单个频道信息
GET /activity/api/detail
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| result | 频道 | object |
| result.name | 频道名称 | string |
| result.description | 频道描述 | string |
| result.visible | 频道是否可见 | bool |
| result.created | 频道创建时间 | string |
| result.update | 频道更新时间 | string |
| result.order | 频道优先级 | int |
| result.start_at | 频道开始时间 | string |
获取多个频道信息
POST /activity/api/listdetail
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| aids | 频道 hashID 数组 | string array | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| result | 频道数组 | object array |
| result.id | 频道 hashID | string |
| result.name | 频道名称 | string |
| result.description | 频道描述 | string |
| result.visible | 频道是否可见 | bool |
| result.created | 频道创建时间 | string |
| result.update | 频道更新时间 | string |
| result.order | 频道优先级 | int |
| result.start_at | 频道开始时间 | string |
| result.uv | 观看用户数,-1为不显示 | int |
| result.pv | 观看次数,-1为不显示 | int |
| result.live_status | 频道直播状态 | bool |
删除频道
POST /activity/api/delete
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hashID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
更新频道
POST /activity/api/update
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hashID | string | 必填 |
| name | 频道名称 | string | 必填 |
| description | 频道描述 | string | 选填,默认为空 |
| visible | 观众是否可见 | bool | 选填,默认不可见 |
| order | 控制台排序 | int | 选填,默认为0 |
| start_at | 直播开始时间,形如: 2006-01-02 15:04:05,可为空 |
string | 选填,默认为当前时间 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
更新频道部分信息
POST /activity/api/update_some
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 | 是否必填 |
|---|---|---|---|---|
| actid | 频道 hashID | string | 必填 | |
| name | 频道名称 | string | 选填 | |
| description | 频道描述 | string | 选填,默认为空 | |
| visible | 观众是否可见 | bool | 选填,默认不可见 | |
| order | 控制台排序 | int | 选填,默认为0 | |
| start_at | 直播开始时间,形如: 2006-01-02 15:04:05,可为空 |
string | 选填,默认为当前时间 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
获取直播引导图配置
GET /activity/api/launch_config
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hashID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| result | 直播引导图配置 | object |
| result.launch | 是否开启直播引导图 | bool |
| result.launch_img_url | 直播引导图地址 | string |
获取频道配置
GET /activity/api/activity_config
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| result | 频道配置 | object |
| result.bgimg_url | 直播窗口背景图 | sring |
| result.icon_url | 频道图标 | string |
| result.coverimg_url | 频道封面图片 | string |
| result.launch | 是否开启直播引导图 | bool |
| result.launch_img_url | 直播引导图 | string |
| result.livetype | 直播方式, 0 推流直播; 1 拉流直播; 2 列表直播; 6 VR设备直播; 10 海外ECDN直播 | int |
| result.watch_bgimg_open | 观看页背景图是否开启 | bool |
| result.watch_bgimg_effect | 观看页背景图显示效果, banner 显示在顶部; bg 显示在整个页面; none 仅显示观看页背景色 | string |
| result.watch_bgimg_color | 观看页背景色 | string |
| result.type | 观看页观看数显示类型, UV 累计观看人数; PV 累计观看次数; NONE 不显示 | string |
| result.modify | 观看数是否开启智能倍增 | bool |
| result.basic | 观看数基础设置人数 | int |
| result.multiple | 观看数设置的倍数 | int |
| result.vr | 是否开启VR直播 | bool |
修改频道部分配置
POST /activity/activity_config_some
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
| params | 参数列表 | object | 必填 |
例如:
{
"actid": "xxxxx",
"params": {"bgimg":"xxxxxx", "launch":"true", "lt":"1"}
}
参数明细:
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| bgimg | 背景图目睹云地址 | string | 选填 |
| icon | 图标目睹云地址 | string | 选填 |
| coverimg | 封面目睹云地址 | string | 选填 |
| launch | 引导图是否开启 | bool | 选填 |
| launchimg | 引导图目睹云地址 | string | 选填 |
| wbo | 观看页背景图是否开启 | bool | 选填 |
| wbe | 观看页背景图效果, banner 显示在顶部; bg 显示在整个页面; none 仅显示观看页背景色 | string | 选填 |
| wbi | 观看页背景图目睹云地址 | string | 选填 |
| wbc | 观看页背景色 | string | 选填 |
| lt | 直播方式, 0 推流直播; 1 拉流直播; 2 列表直播; 6 VR设备直播; 10 海外ECDN直播 | int | 选填 |
| type | 观看页观看数显示类型, UV 累计观看人数; PV 累计观看次数; NONE 不显示 | string | 选填 |
| modify | 观看数是否开启智能倍增 | bool | 选填 |
| basic | 观看数基础设置人数 | int | 选填 |
| multiple | 观看数设置的倍数 | int | 选填 |
| vr | 是否开启VR直播 | bool | 选填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
获取倒计时配置
GET /activity/api/activity_get_countdown
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| result | 倒计时配置 | object |
| result.enable | 是否显示倒计时 | bool |
| result.tips | 倒计时提示语 | string |
| result.datetime | 倒计时时间 | string |
设置倒计时配置
POST /activity/api/activity_set_countdown
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
| datetime | 倒计时时间,形如: 2019-11-02T05:52:29.000Z |
string | 必填 |
| tips | 倒计时提示语 | string | 必填 |
| enable | 是否显示倒计时 | bool | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
设置预告回放配置
POST /activity/api/playback_save
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
| video_id | 视频ID | int | 必填 |
| available | 是否开启 | bool | 必填 |
| autoplay | 是否自动播放 | bool | 必填 |
| expire | 过期时间,形如: 2019-11-02 14:08:20 |
string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
获取预告回放配置
GET /activity/api/playback_get
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| video_id | 视频ID | int |
| available | 是否开启 | bool |
| autoplay | 是否自动播放 | bool |
| expire | 过期时间 | string |
获取滚动公告
GET /activity/api/announcement_get
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| announcement | 滚动公告配置 | object |
| announcement.visible | 是否显示 | bool |
| announcement.content | 滚动公告内容 | string |
| announcement.color | 滚动公告文字颜色 | string |
更新滚动公告
POST /activity/api/announcement_update
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | Activity ID | string | 必填 |
| visible | 是否显示 | bool | 必填 |
| content | 滚动公告内容 | string | 必填 |
| color | 滚动公告文字颜色 | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
获取分享配置
GET /activity/api/social_buttons_config
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回:
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| title | 分享标题 | string |
| preview | 分享内容 | string |
| 微博开关 | bool | |
| 微信开关 | bool | |
| 推特开关 | bool | |
| google_plus | google+开关 | bool |
| facebook开关 | bool | |
| linkedin开关 | bool |
设置分享配置
POST /activity/api/social_buttons_config
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
| title | 分享标题 | string | 必填 |
| preview | 分享内容 | string | 必填 |
| 微博开关 | bool | 选填,默认为false | |
| 微信开关 | bool | 选填,默认为false | |
| 推特开关 | bool | 选填,默认为false | |
| google_plus | google+开关 | bool | 选填,默认为false |
| facebook开关 | bool | 选填,默认为false | |
| linkedin开关 | bool | 选填,默认为false |
返回:
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
获取广告配置
GET /activity/api/advertisement_config
GET /activity/api/tnemesitrevda_config
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
返回:
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| open | 是否开启 | bool |
| video_id | 视频ID | int |
设置广告配置
POST /activity/api/set_advertisement_config
POST /activity/api/set_tnemesitrevda_config
JSON 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 hash ID | string | 必填 |
| video_id | 视频ID | int | 必填 |
| open | 是否开启 | bool | 必填 |
返回:
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
获取频道管理用户列表(需要多人协作权限 ADMIN_ACTIVITY_COOPERATE)
GET /activity/api/activity_admin_userlist
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 Hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| creator | 创建者 | object |
| creator.id | 用户ID | int |
| creator.username | 用户名 | string |
| creator.name | 用户昵称 | string |
| user_list | 用户列表 | object array |
| user_list.id | 用户ID | int |
| user_list.username | 用户名 | string |
| user_list.name | 用户昵称 | string |
获取用户管理频道列表(需要多人协作权限 ADMIN_ACTIVITY_COOPERATE)
GET /activity/api/activity_admin_access?uid=123
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| uid | 用户 ID | int | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
| activity_list | 频道列表 | string array |
清除频道观看用户列表(需要频道配置权限 ADMIN_ACTIVITY_ADMINISTRATOR)
GET /activity/api/access_clear
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| actid | 频道 Hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
更新用户频道管理权限(需要多人协作权限 ADMIN_ACTIVITY_COOPERATE)
POST /activity/api/activity_admin_access_update
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| activity_list | 频道列表 | string array | 必填 |
| userid | 用户ID | int | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |
更新频道管理用户列表(需要多人协作权限 ADMIN_ACTIVITY_COOPERATE)
POST /activity/api/activity_admin_userlist_update
URL 参数
| 参数 | 描述 | 取值 | 是否必填 |
|---|---|---|---|
| user_list | 用户ID列表 | int array | 必填 |
| actid | 频道 Hash ID | string | 必填 |
返回
| 参数 | 描述 | 取值 |
|---|---|---|
| errcode | 错误码 | int |
| msg | 错误内容 | string |