object hostgroup.massupdate(object parameters)
Ez a m¨®dszer lehet?v¨¦ teszi a gazdag¨¦pek ¨¦s sablonok lecser¨¦l¨¦s¨¦t a megadottakra olyanok, amelyek t?bb gazdacsoportban vannak.
Ez a m¨®dszer csak az Admin ¨¦s a Kiemelt rendszergazda sz¨¢m¨¢ra ¨¦rhet? el felhaszn¨¢l¨®i t¨ªpusok. A met¨®dus megh¨ªv¨¢s¨¢ra vonatkoz¨® enged¨¦lyek felhaszn¨¢l¨®i szerepk?rben visszavonhat¨®k be¨¢ll¨ªt¨¢sok. L¨¢sd: User roles tov¨¢bbi inform¨¢ci¨®¨¦rt.
(object)
Parameters containing the IDs of the host groups to update and the objects that should be updated.
Parameter | Type | Description |
---|---|---|
groups (required) |
object/array | Host groups to be updated. The host groups must have the groupid property defined. |
hosts (required) |
object/array | Hosts to replace the current hosts on the given host groups. All other hosts, except the ones mentioned, will be excluded from host groups. Discovered hosts will not be affected. The hosts must have the hostid property defined. |
templates (required) |
object/array | Templates to replace the current templates on the given host groups. All other templates, except the ones mentioned, will be excluded from host groups. The templates must have the templateid property defined. |
(object)
Egy objektumot ad vissza, amely tartalmazza a friss¨ªtett gazdag¨¦p azonos¨ªt¨®it csoportok a "groupids" tulajdons¨¢g alatt.
Replace all hosts in a host group to ones mentioned host and unlink all templates from host group.
Request:
{
"jsonrpc": "2.0",
"method": "hostgroup.massupdate",
"params": {
"groups": [
{
"groupid": "6"
}
],
"hosts": [
{
"hostid": "30050"
}
],
"templates": []
},
"auth": "f223adf833b2bf2ff38574a67bba6372",
"id": 1
}
Response:
CHostGroup::massUpdate() in ui/include/classes/api/services/CHostGroup.php.