-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
6.4.4
The below API call will return an object of objects, however the documentation only states the following:
(integer/array) Returns either:
- an array of objects;
- the count of retrieved objects, if the countOutput parameter has been used.
{"jsonrpc":"2.0","method": "trigger.get",
"params": {
"selectHosts": ["name"],
"selectGroups": ["groupid", "name"],
"selectLastEvent": "extend",
"selectFunctions": "extend",
"expandExpression": "true",
"expandData": "true",
"expandDescription": "true",
"skipDependent": "true",
"preservekeys": "true",
"monitored": "true",
"output": "extend",
"filter": {
"value": 1
},
"sortfield": "priority",
"sortorder": "DESC"
},"id":1}
Returns
{
"jsonrpc": "2.0",
"result": {
"28110": {
"triggerid": "28110",
"expression": "min(/somehost/service.info[\"WinServiceBlah\",state],#3)<>0",
"description": "\"WinServiceBlah\" (Blah bleh service) is not running",
"url": "",
"status": "0",
... snip ...
},
"id": 1
}
I don't know if this is a documentation issue or if it's a bug and the code should never return an object of objects.
Haven't tested any other .get method to see if they have the same issue.
/Lasse