CloudHub Docs
Download Documents

RTC


RestAPI

ChannelAPI

Channel

close_channel

Close channel

interface address

https://api.cloudhub.vip/ChannelAPI/v3/close_channel

Parameter

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelChannel numberString32Required

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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine with Request signature rules to generate
channelChannel numberStringRequired
message_nameMessage nameStringRequiredOnly supports pubMsg and delMsg
signaling_nameSignaling nameStringRequiredThe sent pubMsg and delMsg signaling names are consistent
signaling_idSignaling idStringRequiredThe sent pubMsg and delMsg signaling id are the same
dataAssemble data in the channelArray,StringOptionalPass 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_saveSignaling statusInt1Optional0Whether to save this signaling: 0 Do not save (default); 1 Save, only the saved pubMsg message channel can receive the delMsg message;
send_typeDelivery typeStringOptional__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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelChannel numberString32Required
user_idUser idString32Required
typeTypeInt1Optional11 : Publish (default); 2: Subscribe;
statestateInt1Optional10 : 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelChannel numberString32Required
user_idUser idString32Required

return value

Return correctly

{
    "result":"0",
    "msg":"返回描述"
}

online_users

Get online users

Interface address

https://api.cloudhub.vip/ChannelAPI/v3/online_users

Interface parameters

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelChannel numberString32Required
pagepage numberInt2Optional1example : 1,2,3 …..
page_sizeNumber of items per pageInt2Optional20The 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

FieldIllustrate
resultReturn status code
dataReturn content
user_idUser id
areaUser area
operatorOperator
ipUser exit ip
os_versionOperating platform
tsEntry time, millisecond timestamp
media_lineMedia line
msgDescription Information

create_blacklist

Add to the channel blacklist

Interface address

https://api.cloudhub.vip/ChannelAPI/v3/create_blacklist

Interface parameters

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
scopeBlacklist scopeInt1Required11: enterprise, 2: channel
channel_idChannel numberString20RequiredRequired when scope = 2
astrict_typeRestriction typeInt1Required0: ip, 1: userid, 2: Nick name
astrict_contentRestricted type contentString50Required对应 ip/userid/Nick name
astrict_agingLimited time limitInt1Required0: 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
pagepage numberIntOptional1Start 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
idBlacklist IDIntRequired1

return value

{
  "result": 0
}

Status code reference

status codeIllustrate
0success
1No data
53101The saas enterprise cannot be called, or the channel name cannot be empty
53001The start time and end time must be passed
53002The 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
keyEnterprise AppIDString32RequiredEnterprise management background view AppID
conversionWhether to convertInt1Required11: Convert (default); 2: Dynamic ppt conversion; 3: H5 file; 4: Media file;
isopenIs it a public documentInt1Required0: Non-public document 1: Indicates that the document can be linked
dynamicpptWhether it is a dynamic pptInt1Optional00: non-dynamic ppt; 1: dynamic ppt; need to be set when uploading dynamic ppt;
isconversionWhether the file is converted to HDInt1Optional20: No transfer; 1: Transfer; 2: Conversion according to enterprise configuration items (default);
isvideoconversionWhether the file video is converted to high-definitionInt1Optional20: No transfer; 1: Transfer; 2: Conversion according to enterprise configuration items (default);
isvideoaloneWhether the media file is converted to HDInt1Optional20: 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

FieldIllustrate
resultReturn status code
swfpathFile relative address
pagenumNumber of document pages
fileidFile id
downloadpathFile download address (download is not supported temporarily)
sizeFile size
filenamefile name
dynamicpptDynamic non-dynamic file status
filepropDistinguish between uploaded dynamic files or H5 file types
file_addressFile access address

Return status code description

status codeIllustrate
0Indicates success
3Cloud storage failed
-1Indicates that the call failed
-2File upload failed
-3File move failed
-4Illegal file type
-5The suffix of the uploaded file does not meet the standard
-6Document cannot be specified as private
-10The 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelChannel numberStringRequired
channel_typeChannel typeInt2Optional21: interactive; 2: live broadcast
file_idDefault display file idIntOptionalSpecify the id of the default display file, if it has been specified before, it will be re-specified as this fileid
fileid_arrFile id groupArrayRequiredFile ID array Example: fileidarr[0]=, fileidarr[1]=, ……
sort_arrThe file id corresponds to the sorted arrayArrayOptionalThe 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelChannel numberStringRequiredChannel number
fileid_arrFile id groupArrayRequiredFile 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
fileidarrFile id groupArrayRequiredFile 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelnameChannel nameStringRequiredChannel name
starttimeRecording start timeInt10OptionalTimestamp (seconds) 10 digits
endtimeRecording end timeInt10OptionalTimestamp (seconds) 10 digits
pagepage numberIntOptional1Start from 1 by default

return value

Return correctly

{
    "result": "返回状态码",
    "data": [
          {
            "recordid": "录制件 id",
            "recordtitle": "录制件名称",
            "starttime": "录制开始时间",
            "duration":"录制时长",
            "list": [
                       "常规录制件里的具体文件列表"
            ],
            "ossBucketUrl": "常规录制件对应域名"
          }
    ]
}

Return status code description

status codeIllustrate
0Indicates success
1No data
53101The saas enterprise cannot be called, or the channel name cannot be empty
53002The 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

ParameterIllustrateTypeLengthOptionalDefaultsRemark
app_idEnterprise AppIDString32RequiredEnterprise management background view AppID
tokenInterface parameter signatureString32RequiredCombine Request signature rules to generate
channelnameChannel nameStringRequiredChannel name
starttimeRecording start timeInt10RequiredTimestamp (seconds) 10 digits
endtimeRecording end timeInt10RequiredTimestamp (seconds) 10 digits
pagepage numberIntOptional1Start from 1 by default

Return value

Return correctly

{
    "result": "返回状态码"
}

Return status code description

status codeIllustrate
0Indicates success
1No data
53101The saas enterprise cannot be called, or the channel name cannot be empty
53001The start time and end time must be passed
53002The 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 codeIllustrate
0success
1Successful execution, no matching data
-1The room is not online
3001Server expired
3002Company has frozen
3003Channel deleted or expired
4001The company does not exist
4007Channel does not exist
4105No matching data
4200file does not exist
4302Incorrect parameter format
5106Indicates that the blacklist does not exist or has been deleted
5107Indicates that id cannot be empty and must be an int type parameter
5108The blacklist range cannot be empty, and the parameters must be in the specified range of the document
5112The restriction type cannot be empty, and the parameter must be in the specified range of the document
5113Restriction type content cannot be empty
5114The restriction type time limit cannot be empty, and the parameter must be in the specified range of the document
5115Channel name cannot be empty
10021The channel needs at least one person to exist
47001app_id parameter does not exist
47002token does not exist
47003token verification failed
47004The enterprise did not generate a verification key or the enterprise app_id parameter passed incorrectly
48005Paas enterprise cannot perform this operation
48001Please check if the parameters are correct
48002Channel does not exist
48003The user does not exist or has left the channel