这个方法允许根据给定的参数检索发现的服务。

    参数

    (object) 定义需要输出的参数。

    这个方法支持以下参数。

    • 一个对象数组;

    • 如果使用了 countOutput 参数,被检索的对象的数量。

    示例

    检索在主机上发现的服务

    检索在被发现主机 “11” 上发现的所有被发现的服务。

    响应:

    1. "jsonrpc": "2.0",
    2. "result": [
    3. {
    4. "dhostid": "11",
    5. "value": "",
    6. "port": "80",
    7. "status": "1",
    8. "lastup": "0",
    9. "lastdown": "1348650607",
    10. "dcheckid": "5",
    11. "ip": "192.168.1.134",
    12. "dns": "john.local"
    13. {
    14. "dserviceid": "13",
    15. "dhostid": "11",
    16. "port": "21",
    17. "status": "1",
    18. "lastup": "0",
    19. "lastdown": "1348650610",
    20. "dcheckid": "6",
    21. "ip": "192.168.1.134",
    22. "dns": "john.local"
    23. }
    24. ],
    25. }

    来源

    CDService::get() in frontends/php/include/classes/api/services/CDService.php.