This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

hostinterface.massremove

説明

object hostinterface.massremove(object parameters)

このメソッドでは、指定されたホストからホストインターフェイスを削除できます。

このメソッドはAdminおよびSuperadminユーザータイプでのみ使用できます。 メソッドを呼び出す権限は、ユーザーロール設定で取り消すことができます。 詳細についてはユーザーの役割を参照してください。

パラメータ

(object) 更新するホストと削除するインターフェースのIDを含むパラメーター

パラメータ タイプ 説明
hostids
(必須)
string/array 更新するホストのID
interfaces
(必須)
object/array 指定されたホストから削除するホストインターフェース。

ホストインターフェースオブジェクトには、ip、dns、およびportプロパティが定義されている必要があります。

戻り値

(object) interfaceidsプロパティの下で削除されたホストインターフェイスのIDを含むオブジェクトを返します。

インターフェイスの削除

2つのホストから"127.0.0.1"SNMPインターフェースを削除します。

Request:

{  "jsonrpc": "2.0",  "method": "hostinterface.massremove",  "params": {  "hostids": [  "30050",  "30052"  ],  "interfaces": {  "dns": "",  "ip": "127.0.0.1",  "port": "161"  }  },  "auth": "038e1d7b1735c6a5436ee9eae095879e",  "id": 1 }

Response:

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

参照

ソース

CHostInterface::massRemove() in ui/include/classes/api/services/CHostInterface.php.