I use Zabbix API method trigger.get
to retrieve a list of available triggers. I try to exclude some triggers from the result list by passing their ids into params
:
"excludeSearch": "true",
"search": {"triggerid": "37328"}
It doesn't seem to exclude the trigger with the given id. In the manual I read:
search
Works only for string and text fields.
I am not sure if it applies to triggerid
which is
triggerids string/array
Anyway, is there any other way to get exclusion by triggerid working?
PS. I tried other names for that parameter, i.e. triggerid
, triggerids
, and experimented with passing value arrays, objects etc.
I'm not aware of a way to exclude triggers by ID in trigger.get
. The confusion regarding string/not is understandable - the API documentation you quote that says "string/array" is looking at this from the API perspective, while the "Works only for string and text fields" part talks about the database field types. The trigger ID is a numeric field in the DB, thus it cannot be searched - and filtering for it cannot be reversed either.