This method allows to simultaneously add multiple related objects to all the given host groups.
Parameters
(object)
Parameters containing the IDs of the host groups to update and the objects to add to all the host groups.
Returns an object containing the IDs of the updated host groups under the groupids
property.
Examples
Adding hosts to host groups
Add two hosts to host groups with IDs 5 and 6.
Response:
{
"jsonrpc": "2.0",
"result": {
"6"
]
},
}
Source
CHostGroup::massAdd() in ui/include/classes/api/services/CHostGroup.php.