REST API文档
高级配置-许可证
申请许可证
信息说明:
参数 | 说明 |
---|---|
channel | 最大通道数 |
conference | 会议人数 |
expire | 许可证过期时间 |
emergency | 紧急程度 |
ivr | IVR |
register | 注册并发数 |
module_license | CHANNEL_LICENSE 申请模块 |
sps | SPS |
users | 用户数 |
参数 | 说明 |
---|---|
module_license | XCC_LICENSE 申请 XCC |
xcc | xcc 通道数 |
xcc_expire | mod_xcc 过期时间 |
参数 | 说明 |
---|---|
module_license | AI_LICENSE 申请 AI |
ai | ai 通道数 |
ai_expire | mod_ai 过期时间 |
参数 | 说明 |
---|---|
module_license | BAIDU_LICENSE 申请百度 |
baidu_tts | tts 通道并发 |
baidu_asr | asr 通道并发 |
baidu_expire | mod_baidu 过期时间 |
参数 | 说明 |
---|---|
module_license | HUAWEI_LICENSE 申请华为 |
huawei_asr | asr 通道并发 |
huawei_tts | tts 通道并发 |
huawei_expire | mod_huawei 过期时间 |
参数 | 说明 |
---|---|
module_license | XUNFEI_LICENSE 申请讯飞 |
xunfei_asr | asr 通道并发 |
xunfei_tts | tts 通道并发 |
xunfei_expire | mod_xunfei 过期时间 |
参数 | 说明 |
---|---|
module_license | ALI_LICENSE 申请阿里 |
ali_asr | asr 通道并发 |
ali_tts | tts 通道并发 |
ali_expire | mod_ali 过期时间 |
参数 | 说明 |
---|---|
module_license | XCC_LICENSE 申请 trtc |
trtc_audio | 腾讯 trtc 音频并发 |
trtc_video | 腾讯 trtc 视频并发 |
trtc_expire | mod_trtc 过期时间 |
参数 | 说明 |
---|---|
module_license | WXAPP_LICENSE 申请小程序 |
wxapp_audio | 音频并发 |
wxapp_video | 视频并发 |
wxapp_expire | mod_wxapp 过期时间 |
查看许可证申请信息
请求 URL:
/api/licenses
请求方式:
GET
Body 信息:无
返回值:参考信息说明
curl 示例:
curl -XGET -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/licenses
- 返回值:
{ "data": [ { "disabled": 0, "name": "test", "deleted_at": "", "id": 1, "server": "", "updated_at": "2023-03-25 07:39:14", "description": "", "created_at": "2023-03-25 07:39:14" } ], "rowCount": 1, "page": 1, "pageCount": 1 }
查看指定许可证需求参数
请求 URL:
/api/licenses/$id/params
请求方式:
GET
Body 信息:无
curl 示例:
curl -XGET -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" 192.168.1.100:8081/api/licenses/1/params
- 返回值:
[ { "id": "2515", "realm": "CHANNEL_LICENSE", "k": "sps", "v": "30" }, { "id": "2516", "realm": "CHANNEL_LICENSE", "k": "register", "v": "300" }, { "id": "2517", "realm": "CHANNEL_LICENSE", "k": "conference", "v": "30" }, { "id": "2518", "realm": "CHANNEL_LICENSE", "k": "users", "v": "300" }, { "id": "2519", "realm": "CHANNEL_LICENSE", "k": "ivr", "v": "30" }, { "id": "2520", "realm": "CHANNEL_LICENSE", "k": "expire", "v": "2023-04-29" }, { "id": "2521", "realm": "CHANNEL_LICENSE", "k": "emergency", "v": "URGENT" }, { "id": "2522", "realm": "CHANNEL_LICENSE", "k": "channel", "v": "100" } ]
创建许可证
- 请求 URL:
/api/licenses
- 请求方式:
POST
- Body 信息:参考开头许可证信息说明
{ "name": "test" }
- curl 示例:
curl -XPOST -H "X-XTRA-AUTH-ID: 69ee9c54-734b-11e7-a262-b5df20245f60" \ -d '{"name": "test"}' \ -H "Content-Type: application/json" "http://192.168.1.100:8081/api/licenses"
- 返回值:
{ "code": 200, "data": 3, "message": "success" }
创建许可证需求信息
- 请求 URL:
/api/licenses/$id
- 请求方式:
POST
- Body 信息:
添加 Channels 模块 license 例子
{ "channel": "100", "conference": "30", "emergency": "URGENT", "expire": "2099-04-29", "ivr": "30", "module_license": "CHANNEL_LICENSE", "register": "300", "sps": "30", "users": "300" }
添加 Agora模块 license 例子
{ "module_license": "AGORA_LICENSE", "agora_audio": "3", "agora_video": "3", "agora_expire": "2024-07-22" }
- curl 示例:
curl -XPOST -H "X-XTRA-AUTH-ID: 69ee9c54-734b-11e7-a262-b5df20245f60" \ -d '{"channel":"100","conference": "30","emergency": "URGENT","expire": "2099-04-29","ivr": "30","module_license": "CHANNEL_LICENSE","register": "300","sps": "30","users": "300"}' \ -H "Content-Type: application/json" "http://192.168.1.100:8081/api/licenses/2"
- 返回值:
{ "code": 200, "message": "success", "data": [ { "v": "URGENT", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "emergency", "id": 2523, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "300", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "users", "id": 2524, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "30", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "conference", "id": 2525, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "30", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "ivr", "id": 2526, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "2023-04-29", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "expire", "id": 2527, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "30", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "sps", "id": 2528, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "300", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "register", "id": 2529, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" }, { "v": "100", "created_at": "2023-03-25 07:52:03", "disabled": 0, "ref_id": 2, "deleted_at": "", "k": "channel", "id": 2530, "updated_at": "2023-03-25 07:52:03", "realm": "CHANNEL_LICENSE" } ] }
修改许可证
- 请求 URL:
/api/licenses/$id
- 请求方式:
PUT
- Body 信息:
{ "name": "new" }
- curl 示例:
curl -XPUT -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" \ -H "Content-Type: application/json" \ -d '{"name": "new"}' \ "192.168.1.100:8081/api/licenses/3"
- 返回值:
{ "code": 200, "data": "3", "message": "success" }
修改指定许可证的参数配置
- 请求 URL:
/api/licenses/$id/params/$param_id
- 请求方式:
PUT
- Body 信息:如下
参数 | 说明 |
---|---|
k | 参数名称 |
v | 参数值 |
{ "v": "1000" }
- curl 示例:
curl -H "X-XTRA-AUTH-ID: 69ee9c54-734b-11e7-a262-b5df20245f60" \ -d '{"v": "1000"}' \ -H "Content-Type: application/json" "http://192.168.1.100:8081/api/licenses/1/params/2513"
- 返回值:
{ "message": "success", "data": "2513", "code": 200 }
删除许可证
请求 URL:
/api/licenses/$id
请求方式:
DELETE
Body 信息:无
示例:
curl -0 -H "X-XTRA-AUTH-ID: 62dd0173-4916-4b1c-b958-546e4d7c91fe" -XDELETE 192.168.1.100:8081/api/licenses/1
- 返回值:
{ "code": 200, "message": "success", "data": "1" }