The method allows to retrieve discovered hosts 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.

    Examples

    Retrieve discovered hosts by discovery rule

    Retrieve all hosts and the discovered services they are running that have been detected by discovery rule “4”.

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "dservices": [
    6. {
    7. "dserviceid": "1",
    8. "dhostid": "1",
    9. "type": "4",
    10. "key_": "",
    11. "value": "",
    12. "port": "80",
    13. "status": "0",
    14. "lastup": "1337697227",
    15. "lastdown": "0",
    16. "dcheckid": "5",
    17. "ip": "192.168.1.1",
    18. "dns": "station.company.lan"
    19. }
    20. ],
    21. "dhostid": "1",
    22. "druleid": "4",
    23. "status": "0",
    24. "lastup": "1337697227",
    25. },
    26. "dservices": [
    27. {
    28. "dserviceid": "2",
    29. "dhostid": "2",
    30. "type": "4",
    31. "key_": "",
    32. "value": "",
    33. "port": "80",
    34. "status": "0",
    35. "lastup": "1337697234",
    36. "lastdown": "0",
    37. "dcheckid": "5",
    38. "ip": "192.168.1.4",
    39. "dns": "john.company.lan"
    40. }
    41. ],
    42. "dhostid": "2",
    43. "druleid": "4",
    44. "status": "0",
    45. "lastup": "1337697234",
    46. "lastdown": "0"
    47. },
    48. {
    49. "dservices": [
    50. {
    51. "dserviceid": "3",
    52. "dhostid": "3",
    53. "type": "4",
    54. "key_": "",
    55. "value": "",
    56. "port": "80",
    57. "status": "0",
    58. "lastup": "1337697234",
    59. "dcheckid": "5",
    60. "dns": "printer.company.lan"
    61. }
    62. ],
    63. "dhostid": "3",
    64. "druleid": "4",
    65. "status": "0",
    66. "lastup": "1337697234",
    67. "lastdown": "0"
    68. },
    69. {
    70. "dservices": [
    71. {
    72. "dserviceid": "4",
    73. "dhostid": "4",
    74. "type": "4",
    75. "key_": "",
    76. "value": "",
    77. "port": "80",
    78. "status": "0",
    79. "lastup": "1337697234",
    80. "lastdown": "0",
    81. "dcheckid": "5",
    82. "ip": "192.168.1.7",
    83. "dns": "mail.company.lan"
    84. }
    85. ],
    86. "dhostid": "4",
    87. "druleid": "4",
    88. "status": "0",
    89. "lastup": "1337697234",
    90. "lastdown": "0"
    91. }
    92. ],
    93. }

    Source