dcheck.get

Description

integer/array dcheck.get(object **parameters**)

The method allows to retrieve discovery checks according to the given parameters.

Parameters

(object) Parameters defining the desired output.

The method supports the following parameters.

ParameterTypeDescription
dcheckidsstring/arrayReturn only discovery checks with the given IDs.
druleidsstring/arrayReturn only discovery checks that belong to the given discovery rules.
dserviceidsstring/arrayReturn only discovery checks that have detected the given discovered services.
sortfieldstring/arraySort the result by the given properties.

Possible values are: dcheckid and druleid.
countOutputbooleanThese parameters being common for all get methods are described in detail in the reference commentary.
editableboolean
excludeSearchboolean
filterobject
limitinteger
outputquery
preservekeysboolean
searchobject
searchByAnyboolean
searchWildcardsEnabledboolean
sortorderstring/array
startSearchboolean

Return values

(integer/array) Returns either:

  • an array of objects;

  • the count of retrieved objects, if the countOutput parameter has been used.

Examples

Retrieve discovery checks for a discovery rule

Retrieve all discovery checks used by discovery rule “6”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "dcheck.get",
  4. "params": {
  5. "output": "extend",
  6. "dcheckids": "6"
  7. },
  8. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": [
  4. {
  5. "dcheckid": "6",
  6. "druleid": "4",
  7. "type": "3",
  8. "key_": "",
  9. "snmp_community": "",
  10. "ports": "21",
  11. "snmpv3_securityname": "",
  12. "snmpv3_securitylevel": "0",
  13. "snmpv3_authpassphrase": "",
  14. "snmpv3_privpassphrase": "",
  15. "uniq": "0",
  16. "snmpv3_authprotocol": "0",
  17. "snmpv3_privprotocol": "0",
  18. "host_source": "1",
  19. "name_source": "0"
  20. }
  21. ],
  22. "id": 1
  23. }

Source

CDCheck::get() in ui/include/classes/api/services/CDCheck.php.