manual:api:reference:host:massadd

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:api:reference:host:massadd [2014/09/25 14:43]
sasha Page moved from 2.4:manual:api:reference:host:massadd to manual:api:reference:host:massadd
manual:api:reference:host:massadd [2020/08/20 08:10] (current)
martins-v internal link to data type commentary (ZBX-17160)
Line 13: Line 13:
 The method accepts the following parameters. The method accepts the following parameters.
  
-^ Parameter ^ Type ^ Description ^+^ Parameter ^ [[:​manual/​api/​reference_commentary#​data_types|Type]] ^ Description ^
 | **hosts** \\ (required) | object/​array | Hosts to be updated. \\ \\ The hosts must have the ''​hostid''​ property defined. | | **hosts** \\ (required) | object/​array | Hosts to be updated. \\ \\ The hosts must have the ''​hostid''​ property defined. |
 | groups | object/​array | Host groups to add to the given hosts. \\ \\ The host groups must have the ''​groupid''​ property defined. ​ | | groups | object/​array | Host groups to add to the given hosts. \\ \\ The host groups must have the ''​groupid''​ property defined. ​ |
Line 30: Line 30:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 60: Line 60:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 74: Line 74:
 ==== See also ==== ==== See also ====
  
-  * [[2.4:​manual:​api:​reference:​host:​update|host.update]] +  * [[update|host.update]] 
-  * [[2.4:manual:​api:​reference:​hostgroup:​object#​host_group|Host group]] +  * [[manual:​api:​reference:​hostgroup:​object#​host_group|Host group]] 
-  * [[2.4:manual:​api:​reference:​template:​object#​template|Template]] +  * [[manual:​api:​reference:​template:​object#​template|Template]] 
-  * [[2.4:manual:​api:​reference:​usermacro:​object#​hosttemplate_level_macro|User macro]] +  * [[manual:​api:​reference:​usermacro:​object#​hosttemplate_level_macro|User macro]] 
-  * [[2.4:manual:​api:​reference:​hostinterface:​object#​host_interface|Host interface]]+  * [[manual:​api:​reference:​hostinterface:​object#​host_interface|Host interface]]
  
 ==== Source ==== ==== Source ====
  
-CHost::​massAdd() in //​frontends/​php/​api/​classes/​CHost.php//​.+CHost::​massAdd() in //​frontends/​php/​include/classes/​api/​services/​CHost.php//​.