manual:api:reference:host:massadd

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:host:massadd [2016/01/22 13:02]
sasha fixed link
manual:api:reference:host:massadd [2020/08/20 08:10] (current)
martins-v internal link to data type commentary (ZBX-17160)
Line 7: Line 7:
 This method allows to simultaneously add multiple related objects to all the given hosts. This method allows to simultaneously add multiple related objects to all the given hosts.
  
-<note warning>​This method is deprecated and will be removed in the future. Please use [[update|host.update]] instead.</​note>​ 
 ==== Parameters ==== ==== Parameters ====
  
Line 14: 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 31: Line 30:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 61: Line 60:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​