REST API文档

高级配置-许可证

申请许可证

信息说明:

参数说明
channel最大通道数
conference会议人数
expire许可证过期时间
emergency紧急程度
ivrIVR
register注册并发数
module_licenseCHANNEL_LICENSE 申请模块
spsSPS
users用户数
参数说明
module_licenseXCC_LICENSE 申请 XCC
xccxcc 通道数
xcc_expiremod_xcc 过期时间
参数说明
module_licenseAI_LICENSE 申请 AI
aiai 通道数
ai_expiremod_ai 过期时间
参数说明
module_licenseBAIDU_LICENSE 申请百度
baidu_ttstts 通道并发
baidu_asrasr 通道并发
baidu_expiremod_baidu 过期时间
参数说明
module_licenseHUAWEI_LICENSE 申请华为
huawei_asrasr 通道并发
huawei_ttstts 通道并发
huawei_expiremod_huawei 过期时间
参数说明
module_licenseXUNFEI_LICENSE 申请讯飞
xunfei_asrasr 通道并发
xunfei_ttstts 通道并发
xunfei_expiremod_xunfei 过期时间
参数说明
module_licenseALI_LICENSE 申请阿里
ali_asrasr 通道并发
ali_ttstts 通道并发
ali_expiremod_ali 过期时间
参数说明
module_licenseXCC_LICENSE 申请 trtc
trtc_audio腾讯 trtc 音频并发
trtc_video腾讯 trtc 视频并发
trtc_expiremod_trtc 过期时间
参数说明
module_licenseWXAPP_LICENSE 申请小程序
wxapp_audio音频并发
wxapp_video视频并发
wxapp_expiremod_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"
}
高级配置-SIP