object maintenance.update(object/array maintenances)
This method allows to update existing maintenances.
This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.
(object/array) Maintenance properties to be updated.
maintenanceid property must be defined for each maintenance, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Additionally to the standard maintenance properties, the method accepts the following parameters.
|groupids||array||IDs of the host groups to replace the current groups.|
|hostids||array||IDs of the hosts to replace the current hosts.|
|timeperiods||array||Maintenance time periods to replace the current periods.|
At least one host or host group must be defined for each maintenance.
(object) Returns an object containing the IDs of the updated maintenances under the
Replace the hosts currently assigned to maintenance "3" with two different ones.
CMaintenance::update() in ui/include/classes/api/services/CMaintenance.php.