object hostprototype.update(object/array hostPrototypes)
This method allows to update existing host prototypes.
(object/array) Host prototype properties to be updated.
hostid property must be defined for each host prototype, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Additionally to the standard host prototype properties, the method accepts the following parameters.
|groupLinks||array||Group links to replace the current group links on the host prototype.|
|groupPrototypes||array||Group prototypes to replace the existing group prototypes on the host prototype.|
|macros||object/array||User macros to replace the current user macros.
All macros that are not listed in the request will be removed.
|templates||object/array||Templates to replace the currently linked templates.
The templates must have the
(object) Returns an object containing the IDs of the updated host prototypes under the
Disable a host prototype, that is, set its status to 1.
CHostPrototype::update() in ui/include/classes/api/services/CHostPrototype.php.