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