Следећи објекти су директно повезани са usermacro
API-јем.
Глобални макро објекат има следећа својства.
Property | Type | Description |
---|---|---|
globalmacroid | ID | ID глобалног макроа. Понашање својства: - само за читање - обавезно за операције ажурирања |
macro | string | Стринг макроа. Понашање својства: -потребно за операције креирања |
value | string | Вредност макроа. Понашање својства: - само за писање ако је type подешен на " Тајни макро"- потребан за операције креирања |
type | integer | Тип макроа. Могуће вредности: 0 - (подразумевано) Текст макро; 1 - Тајни макро; 2 - Тајна трезора. |
description | string | Опис макроа. |
Макро објекат домаћина дефинише макро доступан на домаћину, домаћину прототипа или шаблон. Има следећа својства.
Property | Type | Description |
---|---|---|
hostmacroid | ID | ID макроа домаћина. Понашање својства: - само за читање - потребно за операције ажурирања |
hostid | ID | ID домаћина којем макро припада. Понашање својства: - константа - потребно за операције креирања |
macro | string | Макро стринг. Понашање својства: - потребно за операције креирања |
value | string | Вредност макроа. Понашање својства: - само за писање ако је type подешен на "Тајни макро"- потребно за операције креирања |
type | integer | Тип макроа. Могуће вредности: 0 - (подразумевано) Текст макро; 1 - Тајни макро; 2 - Тајна трезора. |
description | string | Опис макроа. |
automatic | integer | Дефинише да ли се макро контролише правилом откривања. Могуће вредности: 0 - (подразумевано) Макроом управља корисник; 1 - Макроом управља правило откривања. Кориснику није дозвољено да креира аутоматски макро. Да би се ажурирао аутоматски макро, мора бити ажуриран макро приручник. |
The macro configuration object defines how a macro is displayed in the Host Wizard.
Property | Type | Description |
---|---|---|
type | integer | Type of macro input field. Possible values: 0 - Macro is not used in Host Wizard; 1 - Textbox; 2 - List; 3 - Checkbox. Property behavior: - required |
label | string | Label for macro input field. Property behavior: - required if type is set to "Textbox", "List", or "Checkbox" |
description | text | Help text displayed alongside macro input field. Supports Markdown formatting. |
priority | integer | Macro input field position in the macro list. If priority is not set, the macro is added at the end of the ungrouped macro list. |
required | integer | Marks the macro as mandatory. Possible values: 0 - Not mandatory; 1 - Mandatory. Property behavior: - supported if type is set to "Textbox" or "List" |
regex | string | Regular expression to validate user input in a textbox field. Property behavior: - supported if type is set to "Textbox" |
section_name | string | Label of the collapsible section where the macro is grouped. If section_name is not set, the macro is ungrouped. Ungrouped macros are displayed first; grouped macros are displayed below, ordered by their priority within each collapsible section. |
options | text | JSON string defining list items or checkbox values. For lists: an array of objects with value and text properties.Example: [{"value": "http", "text": "HTTP"}, {"value": "https", "text": "HTTPS"}] For checkboxes: an object with checked and unchecked properties.Example: {"checked": true, "unchecked": false} Property behavior: - required if type is set to "List" or "Checkbox" |