查询ip地址信息
功能描述
获取SE主机ip地址状态。
调用URL
http://192.168.1.180:8888/SophonSystem/api/ip
调用方法
GET
请求示例:
请求url: http://192.168.1.180:8888/SophonSystem/api/ip?
返回信息:
请求成功
一级参数
二级参数
类型
描述
data
list
device
string
网络接口, eth0/eth1, eth0对应wan口,eth1对应lan口
dns
string
DNS
ip
string
主机ip地址
netmask
string
子网掩码
status
string
地址类型,静态地址/动态地址, static/dynamic
bandwidth
string
带宽, 单位Mb/s
bandwidth_varity
bool
true/false, 是否满足默认输出
gateway
string
网关,只有eth0网络接口返回该数据
mac
string
mac地址
请求成功示例:
{
"data": [
{
"device": "eth0",
"dns": "192.168.1.2",
"gateway": "192.168.1.2",
"ip": "192.168.1.64",
"netmask": "255.255.240.0",
"status": "static",
"bandwidth":"100.0Mb/s",
"bandwidth_varity":true,
"mac":"e0:a5:09:00:32:31"
},
{
"device": "eth1",
"dns": "192.168.150.1",
"ip": "192.168.150.1",
"netmask": "255.255.255.0",
"status": "static",
"bandwidth":"100.0Mb/s",
"bandwidth_varity":true,
"mac": "e0:a5:09:00:32:35"
}
]
}
请求失败
一级参数
二级参数
类型
描述
error
code
int
请求错误码
message
string
错误描述
status
string
错误类型
Last updated
Was this helpful?