接口描述
提交拨号相关的信息
注:仅提交接口 dialType 参数为 serverDial(服务器拨号)的节点可进行拨号信息提交
请求路径
POST
/v1/nodes/<nodeID>/dial/submit
请求参数
名称 |
类型 |
位置 |
必须 |
描述 |
Authorization |
string |
header |
是 |
鉴权 token |
Content-Type |
string |
header |
是 |
数据类型 application/json |
nodeID |
string |
path |
是 |
节点 ID |
managerNetDevName |
string |
body |
否 |
管理口物理网卡名,managerNetDevName 和 netDevItems 至少有一个传入 |
netDevItems |
[]NetDevItem |
body |
否 |
网卡和账号详细列表 |
NetDevItem
名称 |
类型 |
位置 |
必须 |
描述 |
netDevName |
string |
body |
是 |
物理网卡名 |
accounts |
[]Account |
body |
是 |
拨号账号列表 |
Account
名称 |
类型 |
位置 |
必须 |
描述 |
account |
int |
body |
是 |
拨号账户 |
password |
string |
body |
是 |
拨号密码 |
vlanId |
int |
body |
是 |
vlanId(0 表示不需要配置 vlan) |
bras |
string |
body |
否 |
bras 参数,服务器拨号参数,选传 |
mac |
string |
body |
否 |
mac地址,服务器拨号参数,选传 |
返回值
请求示例
{
"managerNetDevName": "eth0",
"netDevItems": [
{
"netDevName": "eth1",
"accounts": [
{
"account": "05231234567",
"password": "1234567",
"vlanId": 210
}
]
}
]
}
返回值示例
正常请求:
http code 200
异常请求:
http code 4xx/5xx
{
"code": 4000001,
"desc": ""
}
错误码列表
错误码 |
描述 |
401 |
鉴权失败 |
4000002 |
节点未查找到 |
4000302 |
绑定管理网卡失败 |
4000303 |
创建拨号账户失败 |
如接口返回错误码未列举,可在错误码总览中查找