Hi everyone,
I'm using v1.8.3. I'm trying to retrieve the items of some hosts. So far that's what I found, for example, for this request:
The response brings me an array of items, and that's fine.
However, the problem is that the internal query is making an UNION of the items for each host, not an INTERSECTION; it's something like:
Instead of:
When I say "intersection", I mean items with the same key. I want the request to return only the items in common to each host, considering the key_ value.
My question: is there any way to make this intersection, instead of the union, through the API?
Thanks.
I'm using v1.8.3. I'm trying to retrieve the items of some hosts. So far that's what I found, for example, for this request:
Code:
item.get hostids: 2001,2002,2003 <- the host IDs I want to filter by output: extend
However, the problem is that the internal query is making an UNION of the items for each host, not an INTERSECTION; it's something like:
Code:
WHERE hostid = 2001 OR hostid = 2002 OR hostid = 2003
Code:
WHERE hostid = 2001 AND hostid = 2002 AND hostid = 2003
My question: is there any way to make this intersection, instead of the union, through the API?
Thanks.