Áú»¢¶Ä²©

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.

hostinterface.get

?????

integer/array hostinterface.get(object parameters)

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

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

???????

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

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

????? ??? ?????
hostids string/array ???? ?? ????? ???? ??????? ?? ??????? ???????.
interfaceids string/array ???? ?? ????? ???? ?? ?????? ???????.
itemids string/array ???? ?? ????? ???? ??????? ?? ??????? ???????.
triggerids string/array ???? ?? ????? ???? ??????? ?????? ???????? ???????.
selectItems query ???? ?????? items ?? ??????? ???????? ?????.

???? ?'count'.
selectHosts query ???? ?????? hosts ?? ???? ?? ?????? ???????? ?????.
limitSelects integer ????? ?? ???? ??????? ???????? ?? ??? subselects.

?? ?? subselects ?????:
selectItems.
sortfield string/array ???? ?? ?????? ??? ????????? ???????.

????? ??????? ??: interfaceid, dns, ip.
countOutput boolean ???????? ???? ??????? ??? ????? ?-'get' ??????? ?????? ??? ?????? ?????.
????? ????????
excludeSearch ??????
filter object
limit ???? ???
nodeids ??????/????
??? ??????
preservekeys ??????
????? ???????
searchByAny boolean
searchWildcardsEnabled boolean
sortorder ??????/????
startSearch boolean

???? ?????

(???? ???/????) ????? ???:

  • ???? ?? ?????;
  • ????? ?????????? ???????, ?? ?? ?????? countOutput ???? ?????.

???????

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

???? ?? ?? ??????? ?? ??????? ??????? ?? ????? "30057".

?????????:

{
            "jsonrpc": "2.0",
            "method": "hostinterface.get",
            "params": {
                "output": "??????",
                "hostids": "30057"
            },
            "auth": "038e1d7b1735c6a5436ee9eae095879e",
            "????": 1
       }

????????:

{
            "jsonrpc": "2.0",
            "?????": [
                {
                    "interfaceid": "50039",
                    "hostid": "30057",
                    "main": "1",
                    "??? 1",
                    "useip": "1",
                    "ip": "::1",
                    "dns": "",
                    "port": "10050",
                    "available": "0",
                    "error": "",
                    "errors_from": "0",
                    "disable_until": "0",
                    "?????": []
                },
                {
                    "interfaceid": "55082",
                    "hostid": "30057",
                    "main": "0",
                    "??? 1",
                    "useip": "1",
                    "ip": "127.0.0.1",
                    "dns": "",
                    "port": "10051",
                    "available": "0",
                    "error": "",
                    "errors_from": "0",
                    "disable_until": "0",
                    "?????": {
                        "???? 2",
                        "bulk": "0",
                        "?????": "{$SNMP_COMMUNITY}"
                    }
                }
            ],
            "????": 1
       }

???? ????

????

CHostInterface::get()? ???? ui/include/classes/api/services/CHostInterface.php.