If we have a couple of hosts, one of which has a host macro with hostmacroid 28, then the following API request will update the given macro, but delete all of the other macros on both hosts.
API::Host()->massUpdate(array(
'macros' => array(
'hostmacroid' => 28,
'macro' => '{$C}',
'value' => 3
),
'hosts' => array(
array('hostid' => 10116),
array('hostid' => 10091),
)
));
This seems illogical, the massUpdate method should just replace all of the macros on both hosts with the given macros, and passing a 'hostmacroid' should probably trigger an error.
I haven't checked, but there maybe similar problems with other massUpdate methods.