object drule.create(object/array discoveryRules)
This method allows to create new discovery rules.
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) Discovery rules to create.
Additionally to the standard discovery rule properties, the method accepts the following parameters.
|array||Discovery checks to create for the discovery rule.|
(object) Returns an object containing the IDs of the created discrovery rules under the
druleids property. The order of the returned IDs matches the order of the passed discrovery rules.
Create a discovery rule to find machines running the Zabbix agent in the local network. The rule must use a single Zabbix agent check on port 10050.
CDRule::create() in ui/include/classes/api/services/CDRule.php.