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:

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

    Source