host.massadd
This method allows to simultaneously add multiple related objects to all the given hosts.
This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.
Parameters
The method accepts the following parameters.
Returns an object containing the IDs of the updated hosts under the hostids
property.
Examples
Adding macros
Request:
Response:
{
"jsonrpc": "2.0",
"result": {
"10160",
"10167"
},
}