The method allows to retrieve discovered services according to the given parameters.
该方法允许根据给定的参数检索已发现的服务
参数
(object)
Parameters defining the desired output.
(对象) 定义所需输出的参数
该方法支持以下参数
返回整数/数组
:
返回一个对象数组;
如果被使用,返回检索对象的计数.
示例
Retrieve services discovered on a host
检索一台主机上已发现的服务
请求:
响应:
- {
- "jsonrpc": "2.0",
- "result": [
- "dserviceid": "12",
- "dhostid": "11",
- "value": "",
- "port": "80",
- "status": "1",
- "lastup": "0",
- "lastdown": "1348650607",
- "dcheckid": "5",
- "ip": "192.168.1.134",
- "dns": "john.local"
- },
- {
- "dserviceid": "13",
- "value": "",
- "port": "21",
- "status": "1",
- "lastup": "0",
- "lastdown": "1348650610",
- "dcheckid": "6",
- "ip": "192.168.1.134",
- "dns": "john.local"
- }
- ],
- "id": 1
- }
来源
CDService::get() in frontends/php/include/classes/api/services/CDService.php.