Zabbix Documentation 4.0

3.04.05.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.24.4Guidelines

User Tools

Site Tools


manual:api:reference:discoveryrule:update

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:api:reference:discoveryrule:update [2014/09/30 12:54]
127.0.0.1 external edit
manual:api:reference:discoveryrule:update [2019/01/28 14:50] (current)
sasha <code js> => <code java>
Line 29: Line 29:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
     "​method":​ "​discoveryrule.update",​     "​method":​ "​discoveryrule.update",​
     "​params":​ {     "​params":​ {
-        "​itemid":​ "24682",+        "​itemid":​ "22450",
         "​filter":​ {         "​filter":​ {
             "​evaltype":​ 1,             "​evaltype":​ 1,
Line 51: Line 51:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 63: Line 63:
 </​code>​ </​code>​
  
 +=== Disable trapping ===
 +
 +Disable LLD trapping for discovery rule.
 +
 +Request:
 +
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​method":​ "​discoveryrule.update",​
 +    "​params":​ {
 +        "​itemid":​ "​28336",​
 +        "​allow_traps":​ "​0"​
 +    },
 +    "​id":​ 36,
 +    "​auth":​ "​d678e0b85688ce578ff061bd29a20d3b"​
 +}
 +</​code>​
 +
 +Response:
 +
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​result":​ {
 +        "​itemids":​ [
 +            "​28336"​
 +        ]
 +    },
 +    "​id":​ 36
 +}
 +</​code>​
 ==== Source ==== ==== Source ====
  
-CDiscoveryRule::​update() in //​frontends/​php/​api/​classes/​CDiscoveryRule.php//​.+CDiscoveryRule::​update() in //​frontends/​php/​include/classes/​api/​services/​CDiscoveryRule.php//​.