object hostinterface.update(object/array hostInterfaces)
此方法允许更新现有的主机接口。
此方法仅适用于管理员和超级管理员用户类型。调用该方法的权限可在用户角色设置中撤销。更多信息请参阅User roles。
(object/array)
主机接口 待更新。
每个主机接口必须定义interfaceid
属性, 其他属性均为可选。仅指定的属性会被更新, 其余属性将保持不变。
(object)
返回一个包含更新后的 interfaceids
属性下 主机 接口ID的 object
修改主机接口的端口号
请求:
{
"jsonrpc": "2.0",
"method": "hostinterface.update",
"params": {
"interfaceid": "30048",
"port": "30050"
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
响应:
CHostInterface::update() 方法位于 ui/include/classes/api/services/CHostInterface.php 文件中。