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:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "6"
    5. ]
    6. },
    7. }

    Source

    CHostGroup::massAdd() in ui/include/classes/api/services/CHostGroup.php.