Zabbix Documentation 5.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: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 [2014/09/30 12:54]
127.0.0.1 external edit
manual:api:reference:host:massadd [2020/05/05 11:40] (current)
martins-v frontends/php -> ui (ZBX-17667)
Line 16: Line 16:
 | **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. ​ |
-| interfaces | object/​array | Host interfaces to be created for the given hosts. | +| interfaces | object/​array ​| [[:​manual/​api/​reference/​hostinterface/​object|Host interfaces]] to be created for the given hosts. | 
-| macros | object/​array | User macros to be created for the given hosts. |+| macros | object/​array ​| [[:​manual/​api/​reference/​usermacro/​object|User macros]] to be created for the given hosts. |
 | templates | object/​array | Templates to link to the given hosts. \\ \\ The templates must have the ''​templateid''​ property defined. | | templates | object/​array | Templates to link to the given hosts. \\ \\ The templates must have the ''​templateid''​ property defined. |
 ==== Return values ==== ==== Return values ====
Line 30: Line 30:
  
 Request: Request:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 50: Line 50:
             {             {
                 "​macro":​ "​{$TEST2}",​                 "​macro":​ "​{$TEST2}",​
-                "​value":​ "​MACROTEST2"​+                "​value":​ "​MACROTEST2", 
 +                "​description":​ "Test description"
             }             }
         ]         ]
Line 60: Line 61:
  
 Response: Response:
-<​code ​js>+<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 82: Line 83:
 ==== Source ==== ==== Source ====
  
-CHost::​massAdd() in //frontends/php/api/classes/​CHost.php//​.+CHost::​massAdd() in //ui/include/​classes/api/services/​CHost.php//​.