This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

discoveryrule.copy

Description

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.

Paraméterek

"(object)" A másolandó LLD-szabályokat és a célt meghatározó paraméterek otthont ad.

Paraméter Típus Leírás
discoveryids array A másolandó LLD-szabályok azonosítói.
hostids array Az LLD-szabályokat másolandó gazdagépek azonosítói.

Visszatérési értékek

(boolean) true-t tér vissza, ha a másolás sikeres volt.

Példák

Copy an LLD rule to multiple hosts

Copy an LLD rule to two hosts.

Request:

{
           "jsonrpc": "2.0",
           "method": "discoveryrule.copy",
           "params": {
               "discoveryids": [
                   "27426"
               ],
               "hostids": [
                   "10196",
                   "10197"
               ]
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

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

Forrás

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