You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.


This method is deprecated and will be removed in the future. Instead, you can configure LLD rules on templates and apply these templates to other templates or hosts, effectively copying the LLD rules to the specified targets.


object discoveryrule.copy(object parameters)

This method allows to copy LLD rules with all of the prototypes to the given hosts.

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) Parameters defining the LLD rules to copy and the target hosts.

Parameter Type Description
discoveryids array IDs of the LLD rules to be copied.
hostids array IDs of the hosts to copy the LLD rules to.

Return values

(boolean) Returns true if the copying was successful.


Copy an LLD rule to multiple hosts

Copy an LLD rule to two hosts.


           "jsonrpc": "2.0",
           "method": "discoveryrule.copy",
           "params": {
               "discoveryids": [
               "hostids": [
           "id": 1


           "jsonrpc": "2.0",
           "result": true,
           "id": 1


CDiscoveryRule::copy() in ui/include/classes/api/services/CDiscoveryRule.php.