-
产品介绍
-
开发指南
-
Open API
API说明 配置集群名称 添加边缘nginx用于代理转发文件下载 获取集群信息和节点列表 添加https证书 删除http的CA证书 获取证书列表 设置无播放状态超时多久自动关闭流 获取无人观看流自动关闭流功能的超时设置 当前能用的nginx服务 获取hook日志 Body 请求参数 从列表中获取对应nginx服务信息进行操作 有推流时向该接口的url参数设置的地址发送一个post请求 关闭边缘或者源站服务站点 获取正在推流的列表 启动边缘或者源站服务站点 推流记录查询接口 重启边缘或者源站服务站点 获取当前集群占用带宽和推拉流信息 hook统计接口 通过IP和端口查找源节点 根据边节点IP和端口查找边节点 获取月度流量 添加源站nginx 更新证书内容接口 删除某个源站 删除源站nginx 删除某个边缘站点 删除边缘nginx

add_or_set_edge
根据边节点IP和端口查找边节点,如已存在则更新边节点配置信息,否则添加边节点 边节点需先部署
Body 请求参数
{
"ip":"string",
"rtmp_port":0,
"https_port":0,
"http_port":0,
"port":0,
"max_connection":0,
"https_enable":"string",
"httpflv_enable":"string",
"onplay":"string",
"unplay":"string",
"onpublish":"string",
"unpublish":"string",
"name":"string",
"https_crt_name":"string",
"https_crt_id":"string",
"desc":"string",
"token":"string"
}
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
ip | body | string | 是 | 边节点IP |
rtmp_port | body | integer | 是 | 大于1024 |
https_port | body | integer | 是 | 大于1024,https需要配置了http端口才会生效 |
http_port | body | integer | 是 | 大于1024 |
port | body | integer | 是 | 边节点端口 |
max_connection | body | integer | 是 | 最小100,最大10000 |
https_enable | body | string | 是 | on开,off关 |
httpflv_enable | body | string | 是 | on开,off关 |
onplay | body | string | 否 | 拉流鉴权接口 |
unplay | body | string | 否 | 暂时无需设置 |
onpublish | body | string | 否 | 推流鉴权接口 |
unpublish | body | string | 否 | 暂时无需设置 |
name | body | string | 否 | 边节点名称 |
https_crt_name | body | string | 否 | https证书名称,已弃用 |
https_crt_id | body | string | 是 | https证书id |
desc | body | string | 否 | 边节点描述信息 |
token | body | string | 是 | none |
返回示例
{
"code":0,
"reason":"",
"data":{}
}
返回数据结构
名称 | 类型 | 必选 | 约束 | 说明 |
code | integer | true | none | none |
reason | string | true | none | none |
data | object | true | none | none |