2022 Zabbix中国峰会
2022 Zabbix中国峰会

删除

描述

object hostinterface.delete(array hostInterfaceIds)

此方法允许删除主机接口

参数

(数组) 要删除主机接口的ID.

返回值

(对象)interfaceids属性中返回已删除主机接口ID的对象.

示例

删除主机接口

删除ID为30062的主机接口.

请求:

{
           "jsonrpc": "2.0",
           "method": "hostinterface.delete",
           "params": [
               "30062"
           ],
           "auth": "3a57200802b24cda67c4e4010b50c065",
           "id": 1
       }

响应:

{
           "jsonrpc": "2.0",
           "result": {
               "interfaceids": [
                   "30062"
               ]
           },
           "id": 1
       }

参考

来源

CHostInterface::delete() in frontends/php/include/classes/api/services/CHostInterface.php.