Zabbix Documentation 1.8

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


api:host:massremove

Differences

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

Link to this comparison view

api:host:massremove [2019/10/07 06:35]
api:host:massremove [2014/09/25 14:40] (current)
sasha Page moved from 1.8:api:host:massremove to api:host:massremove
Line 1: Line 1:
 +===== massRemove() =====
 +Available since version: **1.8**\\
 +==== Parameters ====
 +multidimensional array with Hosts data\\
  
 +^Parameter^Type^Optional^Description^Details^
 +|**hostids**|//​array//​| ​ |Hostids to update | |
 +|**groupids**|//​array//​| Yes |Host groupids where hosts should be removed. | |
 +|**templateids**|//​array//​| Yes |Templateid which should be unlinked from hosts. | |
 +|**macros**|//​array//​| Yes |Macros which should be removed from hosts. ​ | |
 +
 +==== Returns =====
 +^Parameter^Description^
 +|**result**|Operation successful. Result will contain array of updated Host IDs.|
 +|**error**|In case of any errors|
 +==== Example ====
 +
 +Remove from host with **ID** "​100100000010092"​ two macros {$TEST1},​{$TEST2}
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​method":"​host.massRemove",​
 +"​params":​{ ​
 + "​hostids":​ ["​100100000010092"​],​
 + "​macros":​ ["​{$TEST1}","​{$TEST2}"​]
 +},
 +"​auth":"​f223adf833b2bf2ff38574a67bba6372",​
 +"​id":​2
 +}
 +</​code>​
 +
 +Hosts updated successfully:​
 +
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​result":​{
 +  "​hostids":​["​100100000010092"​]
 +},
 +"​id":​2
 +}
 +</​code>​