RestAPI
ChannelAPI
Channel
close_channel
Close channel
interface address
https://api.cloudhub.vip/ChannelAPI/v3/close_channel
Parameter
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channel | Channel number | String | 32 | Required |
return value
Return correctly
{
"result": "0",
"msg": "返回描述"
}
Signaling
custom_signal_sending
Custom signaling
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/custom_signal_sending
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine with Request signature rules to generate | |
channel | Channel number | String | Required | |||
message_name | Message name | String | Required | Only supports pubMsg and delMsg | ||
signaling_name | Signaling name | String | Required | The sent pubMsg and delMsg signaling names are consistent | ||
signaling_id | Signaling id | String | Required | The sent pubMsg and delMsg signaling id are the same | ||
data | Assemble data in the channel | Array,String | Optional | Pass the value array or json string, the data needed to be assembled in the channel, the data pass value is as follows: data[key1]=value1, data[key2]=value2, json string example: {“key1”:" value1",“key2”:“value2”} | ||
is_save | Signaling status | Int | 1 | Optional | 0 | Whether to save this signaling: 0 Do not save (default); 1 Save, only the saved pubMsg message channel can receive the delMsg message; |
send_type | Delivery type | String | Optional | __all | __all : Send information to everyone in the channel (default), __allExceptSender: send information to everyone in the channel except yourself, __none: only send information to the signaling server and not to anyone, *****: a user ID . Only send information to this user |
return value
Return correctly
{
"result":"0",
"msg":"返回描述"
}
user
user_publish_subscribe
Prohibit users/allow users to publish (subscribe)
interface address
https://api.cloudhub.vip/ChannelAPI/v3/user_publish_subscribe
Parameter
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channel | Channel number | String | 32 | Required | ||
user_id | User id | String | 32 | Required | ||
type | Type | Int | 1 | Optional | 1 | 1 : Publish (default); 2: Subscribe; |
state | state | Int | 1 | Optional | 1 | 0 : Forbidden; 1: Allow (default); |
return value
Return correctly
{
"result": "0",
"msg": "返回描述"
}
user_off_line
Kick out the specified user from the channel
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/user_off_line
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channel | Channel number | String | 32 | Required | ||
user_id | User id | String | 32 | Required |
return value
Return correctly
{
"result":"0",
"msg":"返回描述"
}
online_users
Get online users
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/online_users
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channel | Channel number | String | 32 | Required | ||
page | page number | Int | 2 | Optional | 1 | example : 1,2,3 ….. |
page_size | Number of items per page | Int | 2 | Optional | 20 | The default is 20, and the maximum is not more than 100 |
return value
Return correctly
{
"result": 0,
"data": [
{
"user_id": "733be467-007d-4830-6b60-4eb73fa10dda",
"area": "中国.北京.北京",
"operator": "电信",
"ip": "114.112.179.70",
"os_version": "Win10",
"ts": 1610001163261,
"media_line": "cna"
}
],
"msg": "success"
}
Return field description
Field | Illustrate |
---|---|
result | Return status code |
data | Return content |
user_id | User id |
area | User area |
operator | Operator |
ip | User exit ip |
os_version | Operating platform |
ts | Entry time, millisecond timestamp |
media_line | Media line |
msg | Description Information |
create_blacklist
Add to the channel blacklist
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/create_blacklist
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
scope | Blacklist scope | Int | 1 | Required | 1 | 1: enterprise, 2: channel |
channel_id | Channel number | String | 20 | Required | Required when scope = 2 | |
astrict_type | Restriction type | Int | 1 | Required | 0: ip, 1: userid, 2: Nick name | |
astrict_content | Restricted type content | String | 50 | Required | 对应 ip/userid/Nick name | |
astrict_aging | Limited time limit | Int | 1 | Required | 0: 5 minutes, 1: 30 minutes, 2: same day, 3: permanent |
return value
{
"result": 0
}
blacklist
Get the blacklist of incoming channels
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/blacklist
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
page | page number | Int | Optional | 1 | Start from 1 by default |
return value
{
"result":0,
"list":[
{
"id":"黑名单 id",
"scope":"黑名单范围 1: 企业, 2: 通道",
"channel":"黑名单通道号 指定通道",
"astrict_type":"限制类型 0: ip, 1: userid, 2: 昵称",
"astrict_content":"限制类型对应内容 ",
"astrict_aging":"限制时效 0: 5分钟, 1: 半小时, 2: 当天, 3: 永久",
"add_time":"添加时间",
"effective_time":"有效时间根据时效和添加时间计算得来"
}
],
"page":1,
"pagenumber":20
}
delete_blacklist
Delete the blacklist of incoming channels
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/delete_blacklist
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
id | Blacklist ID | Int | Required | 1 |
return value
{
"result": 0
}
Status code reference
status code | Illustrate |
---|---|
0 | success |
1 | No data |
53101 | The saas enterprise cannot be called, or the channel name cannot be empty |
53001 | The start time and end time must be passed |
53002 | The time format is abnormal, or the start time is greater than the end time, and the end time is greater than the current time |
document
upload_file
upload files
Interface address
https://api.cloudhub.vip/ChannelAPI/upload_file
This interface does not need to add token public parameters, you can directly use post to submit (file preview domain name: https://rddoccdnws.roadofcloud.net);
Dynamic ppt: The parameter setting is conversion = 2, dynamicppt =1; Ordinary document: The parameter setting is conversion =1, dynamicppt =0;
Require upload type type=“file” The file name is filedata;
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
key | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
conversion | Whether to convert | Int | 1 | Required | 1 | 1: Convert (default); 2: Dynamic ppt conversion; 3: H5 file; 4: Media file; |
isopen | Is it a public document | Int | 1 | Required | 0: Non-public document 1: Indicates that the document can be linked | |
dynamicppt | Whether it is a dynamic ppt | Int | 1 | Optional | 0 | 0: non-dynamic ppt; 1: dynamic ppt; need to be set when uploading dynamic ppt; |
isconversion | Whether the file is converted to HD | Int | 1 | Optional | 2 | 0: No transfer; 1: Transfer; 2: Conversion according to enterprise configuration items (default); |
isvideoconversion | Whether the file video is converted to high-definition | Int | 1 | Optional | 2 | 0: No transfer; 1: Transfer; 2: Conversion according to enterprise configuration items (default); |
isvideoalone | Whether the media file is converted to HD | Int | 1 | Optional | 2 | 0: No transfer; 1: Transfer; 2: Conversion according to enterprise configuration items (default); |
return value
Return correctly
{
"result": 0,
"swfpath": "文件相对路径",
"pagenum": "文件页数",
"fileid": "文件id",
"downloadpath": "文件下载地址(暂不支持下载)",
"size": "文件大小",
"status": "转换状态:0排队中,1成功,2转换失败,3转换中",
"filename": "上传文件名称",
"dynamicppt": "是否是动态 ppt,0: 非动态 ppt, 1: 动态 ppt",
"fileprop": "0:默认,2:动态 ppt,3: h5 文件",
"file_address": "文件拼接访问地址"
}
Return field description
Field | Illustrate |
---|---|
result | Return status code |
swfpath | File relative address |
pagenum | Number of document pages |
fileid | File id |
downloadpath | File download address (download is not supported temporarily) |
size | File size |
filename | file name |
dynamicppt | Dynamic non-dynamic file status |
fileprop | Distinguish between uploaded dynamic files or H5 file types |
file_address | File access address |
Return status code description
status code | Illustrate |
---|---|
0 | Indicates success |
3 | Cloud storage failed |
-1 | Indicates that the call failed |
-2 | File upload failed |
-3 | File move failed |
-4 | Illegal file type |
-5 | The suffix of the uploaded file does not meet the standard |
-6 | Document cannot be specified as private |
-10 | The uploaded file is larger than 100M or the number of pages exceeds the limit |
bind_file
Channel associated files
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/bind_file
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channel | Channel number | String | Required | |||
channel_type | Channel type | Int | 2 | Optional | 2 | 1: interactive; 2: live broadcast |
file_id | Default display file id | Int | Optional | Specify the id of the default display file, if it has been specified before, it will be re-specified as this fileid | ||
fileid_arr | File id group | Array | Required | File ID array Example: fileidarr[0]=, fileidarr[1]=, …… | ||
sort_arr | The file id corresponds to the sorted array | Array | Optional | The sort value corresponds to the file id array, for example: sortarr[0]=, sortarr[1]=, …… |
return value
Return correctly
{
"result":"0",
"msg":"返回描述"
}
unbind_file
Channel unlinking files
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/unbind_file
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channel | Channel number | String | Required | Channel number | ||
fileid_arr | File id group | Array | Required | File id array Example: fileidarr[0]=, fileidarr[1]=, …… |
return value
Return correctly
{
"result":"0",
"msg":"返回描述"
}
delete_file
Delete Files
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/delete_file
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
fileidarr | File id group | Array | Required | File id array Example: fileidarr[0]=, fileidarr[1]=, …… |
return value
Return correctly
{
"result":"0",
"msg":"返回描述"
}
Record
get_channel_record_list
Get regular recordings
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/get_channel_record_list
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channelname | Channel name | String | Required | Channel name | ||
starttime | Recording start time | Int | 10 | Optional | Timestamp (seconds) 10 digits | |
endtime | Recording end time | Int | 10 | Optional | Timestamp (seconds) 10 digits | |
page | page number | Int | Optional | 1 | Start from 1 by default |
return value
Return correctly
{
"result": "返回状态码",
"data": [
{
"recordid": "录制件 id",
"recordtitle": "录制件名称",
"starttime": "录制开始时间",
"duration":"录制时长",
"list": [
"常规录制件里的具体文件列表"
],
"ossBucketUrl": "常规录制件对应域名"
}
]
}
Return status code description
status code | Illustrate |
---|---|
0 | Indicates success |
1 | No data |
53101 | The saas enterprise cannot be called, or the channel name cannot be empty |
53002 | The time format is abnormal, or the start time is greater than the end time, and the end time is greater than the current time |
delete_channel_record
Delete regular recordings
Interface address
https://api.cloudhub.vip/ChannelAPI/v3/delete_channel_record
Interface parameters
Parameter | Illustrate | Type | Length | Optional | Defaults | Remark |
---|---|---|---|---|---|---|
app_id | Enterprise AppID | String | 32 | Required | Enterprise management background view AppID | |
token | Interface parameter signature | String | 32 | Required | Combine Request signature rules to generate | |
channelname | Channel name | String | Required | Channel name | ||
starttime | Recording start time | Int | 10 | Required | Timestamp (seconds) 10 digits | |
endtime | Recording end time | Int | 10 | Required | Timestamp (seconds) 10 digits | |
page | page number | Int | Optional | 1 | Start from 1 by default |
Return value
Return correctly
{
"result": "返回状态码"
}
Return status code description
status code | Illustrate |
---|---|
0 | Indicates success |
1 | No data |
53101 | The saas enterprise cannot be called, or the channel name cannot be empty |
53001 | The start time and end time must be passed |
53002 | The time format is abnormal, or the start time is greater than the end time, and the end time is greater than the current time |
Status code reference
status code | Illustrate |
---|---|
0 | success |
1 | Successful execution, no matching data |
-1 | The room is not online |
3001 | Server expired |
3002 | Company has frozen |
3003 | Channel deleted or expired |
4001 | The company does not exist |
4007 | Channel does not exist |
4105 | No matching data |
4200 | file does not exist |
4302 | Incorrect parameter format |
5106 | Indicates that the blacklist does not exist or has been deleted |
5107 | Indicates that id cannot be empty and must be an int type parameter |
5108 | The blacklist range cannot be empty, and the parameters must be in the specified range of the document |
5112 | The restriction type cannot be empty, and the parameter must be in the specified range of the document |
5113 | Restriction type content cannot be empty |
5114 | The restriction type time limit cannot be empty, and the parameter must be in the specified range of the document |
5115 | Channel name cannot be empty |
10021 | The channel needs at least one person to exist |
47001 | app_id parameter does not exist |
47002 | token does not exist |
47003 | token verification failed |
47004 | The enterprise did not generate a verification key or the enterprise app_id parameter passed incorrectly |
48005 | Paas enterprise cannot perform this operation |
48001 | Please check if the parameters are correct |
48002 | Channel does not exist |
48003 | The user does not exist or has left the channel |