This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

> User macro object

The following objects are directly related to the usermacro API.

Global macro

The global macro object has the following properties.

Property Type Description
globalmacroid string (readonly) ID of the global macro.
macro
(required)
string Macro string.
value
(required)
string Value of the macro.
type integer Type of macro.

Possible values:
0 - (default) Text macro;
1 - Secret macro;
2 - Vault secret.
description string Description of the macro.

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

Host macro

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

Property Type Description
hostmacroid string (readonly) ID of the host macro.
hostid
(required)
string ID of the host that the macro belongs to.
macro
(required)
string Macro string.
value
(required)
string Value of the macro.
type integer Type of macro.

Possible values:
0 - (default) Text macro;
1 - Secret macro;
2 - Vault secret.
description string Description of the macro.
automatic integer Defines whether the macro is controlled by discovery rule.

Possible values:
0 - (default) Macro is managed by user;
1 - Macro is managed by discovery rule.

User is not allowed to create automatic macro. To update automatic macro, it must be converted to manual.

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