The method allows to retrieve discovered services according to the given parameters.

    该方法允许根据给定的参数检索已发现的服务

    参数

    (object) Parameters defining the desired output.

    (对象) 定义所需输出的参数

    该方法支持以下参数

    返回整数/数组:

    • 返回一个对象数组;

    • 如果被使用,返回检索对象的计数.

    示例

    Retrieve services discovered on a host

    检索一台主机上已发现的服务

    请求:

    响应:

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

    来源

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