object itemprototype.update(object/array itemPrototypes)
This method allows to update existing item prototypes.
(object/array) Item prototype properties to be updated.
itemid property must be defined for each item prototype, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Additionally to the standard item prototype properties, the method accepts the following parameters.
|applications||array||IDs of the applications to replace the current applications.|
|applicationPrototypes||array||Names of the application prototypes to replace the current application prototypes.|
|preprocessing||array||Item prototype preprocessing options to replace the current preprocessing options.|
(object) Returns an object containing the IDs of the updated item prototypes under the
Change the host interface that will be used by discovered items.
Update Dependent item prototype with new Master item prototype ID. Only dependencies on same host (template/discovery rule) are allowed, therefore Master and Dependent item should have same hostid and ruleid.
Change query fields and remove all custom headers.
CItemPrototype::update() in frontends/php/include/classes/api/services/CItemPrototype.php.
Update a script item prototype with a different script and remove unnecessary parameters that were used by previous script.
CItemPrototype::update() in ui/include/classes/api/services/CItemPrototype.php.