Áú»¢¶Ä²©

This is the documentation page for an unsupported version of Áú»¢¶Ä²©.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

usermacro.create

?????

object usermacro.create(object/array hostMacros)

???? ?? ?????? ????? ?????? ????? ???? ?????.

???? ?? ????? ?? ?-Admin ?-Super Admin ???? ???????. ???? ???? ?????? ????? ????? ?????? ????? ??????. ??? ????? ??????? ????? ????.

???????

(???????/????) ???? ?????? ????? ??????.

????? ????? ?????? ????? ???? ?? ????? ???? ???? ????????.

???? ?????

(object) ?????? ??????? ????? ?? ?????? ?? ????? ????? ?????? ????? ??? ??????? hostmacroids. ??? ??????? ???????? ???? ?? ???? ?? ?????? ?????? ????? ?????.

???????

????? ????? ????

??? ????? ???? "{$SNMP_COMMUNITY}" ?? ???? "??????" ?? ????? "10198".

?????????:

{
            "jsonrpc": "2.0",
            "method": "usermacro.create",
            "params": {
                "hostid": "10198",
                "macro": "{$SNMP_COMMUNITY}",
                "value": "??????"
            },
            "auth": "038e1d7b1735c6a5436ee9eae095879e",
            "????": 1
       }

????????:

{
            "jsonrpc": "2.0",
            "?????": {
                "hostmacroids": [
                    "11"
                ]
            },
            "????": 1
       }

????

CUserMacro::create()? ???? ui/include/classes/api/services/CUserMacro.php.