The method allows to retrieve host interfaces according to the given parameters.该方法允许根据给定的参数检索主机接口。

    Parameters 参数

    (object) Parameters defining the desired output.定义所需输出的参数。

    The method supports the following parameters.该方法支持以下参数。

    • an array of objects;一组对象;

    • the count of retrieved objects, if the countOutput parameter has been used.如果已经使用“countOutput”参数,则检索到的对象的计数。

    Examples 示例

    Retrieve host interfaces检索主机接口

    Retrieve all data about the interfaces used by host “30057.”检索主机“30057”使用的接口的所有数据。

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "interfaceid": "30050",
    6. "hostid": "30057",
    7. "main": "1",
    8. "useip": "1",
    9. "ip": "127.0.0.1",
    10. "dns": "",
    11. "port": "10050",
    12. "bulk": "1"
    13. },
    14. {
    15. "interfaceid": "30067",
    16. "hostid": "30057",
    17. "main": "0",
    18. "type": "1",
    19. "useip": "0",
    20. "ip": "",
    21. "dns": "localhost",
    22. "port": "10050",
    23. "bulk": "1"
    24. {
    25. "interfaceid": "30068",
    26. "hostid": "30057",
    27. "main": "1",
    28. "type": "2",
    29. "useip": "1",
    30. "ip": "127.0.0.1",
    31. "dns": "",
    32. "port": "161",
    33. "bulk": "1"
    34. }
    35. ],
    36. "id": 1
    37. }

    Source 来源