object discoveryruleprototype.update(object/array lldRules)
This method allows to update existing LLD rule prototypes.
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)
LLD rule prototype properties to be updated.
The itemid
property must be defined for each LLD rule prototype, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Additionally to the standard LLD rule prototype properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
filter | object | LLD rule prototype filter to replace the existing filter. |
preprocessing | object/array | LLD rule prototype preprocessing options to replace the existing preprocessing options. Parameter behavior: - read-only for inherited objects |
lld_macro_paths | object/array | LLD rule prototype lld_macro_path options to replace the existing lld_macro_path options. Parameter behavior: - read-only for inherited objects |
overrides | object/array | LLD rule prototype overrides options to replace the existing overrides options. Parameter behavior: - read-only for inherited objects |
(object)
Returns an object containing the IDs of the updated LLD rule prototypes under the itemids
property.
Update an LLD rule prototype with a JSONPath preprocessing rule. Request:
{
"jsonrpc": "2.0",
"method": "discoveryruleprototype.update",
"params": {
"itemid": "47253",
"preprocessing": [
{
"type": 12,
"params": "$.tablespaces",
"error_handler": 1
}
]
},
"id": 1
}
Response:
CDiscoveryRulePrototype::update() in ui/include/classes/api/services/CDiscoveryRulePrototype.php.