龙虎赌博

This is a translation of the original English documentation page. Help us make it better.

host.massremove

説明

object host.massremove(object parameters)

このメソッドは、复数のホストから関连するオブジェクトを削除することができます。

このメソッドは、Admin および Super admin ユーザータイプにのみ使用できます。このメソッドを呼び出す许可は、
ユーザーロール设定で取り消すことができます。详细については、User roles を参照してください。

パラメータ

(object) 更新するホストと削除するオブジェクトの滨顿を含むパラメータ

パラメータ Type 説明
hostids
(required)
string/array IDs of the hosts to be updated.
groupids string/array Host groups to remove the given hosts from.
interfaces object/array Host interfaces to remove from the given hosts.

The host interface object must have the ip, dns and port properties defined.
macros string/array User macros to delete from the given hosts.
templateids string/array Templates to unlink from the given hosts.
templateids_clear string/array Templates to unlink and clear from the given hosts.

戻り値

(object) hostids プロパティの下で更新されたホストの ID を含むオブジェクトを返します。

テンプレートのリンク解除

2つのホストからテンプレートのリンクを解除し、テンプレート化されたエンティティをすべて削除します。

Request:

{
           "jsonrpc": "2.0",
           "method": "host.massremove",
           "params": {
               "hostids": ["69665", "69666"],
               "templateids_clear": "325"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "hostids": [
                   "69665",
                   "69666"
               ]
           },
           "id": 1
       }

参照

ソース

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