[comment]: # ({ee4a2645-28092341})
# User macro object

The following objects are directly related to the `usermacro` API.

[comment]: # ({/ee4a2645-28092341})

[comment]: # ({33703a46-422b24e3})
### Global macro

The global macro object has the following properties.

|Property|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|globalmacroid|string|*(readonly)* ID of the global macro.|
|**macro**<br>(required)|string|Macro string.|
|**value**<br>(required)|string|Value of the macro.|

Note that for some methods (update, delete) the required/optional parameter combination is different.

[comment]: # ({/33703a46-422b24e3})

[comment]: # ({82436499-c5d988d8})
### Host macro

The host macro object defines a macro available on a host or template.
It has the following properties.

|Property|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|hostmacroid|string|*(readonly)* ID of the host macro.|
|**hostid**<br>(required)|string|ID of the host that the macro belongs to.|
|**macro**<br>(required)|string|Macro string.|
|**value**<br>(required)|string|Value of the macro.|

Note that for some methods (update, delete) the required/optional parameter combination is different.

[comment]: # ({/82436499-c5d988d8})
