Hi Fleet team, i am trying to run some APIs and fi...
# fleet
w
Hi Fleet team, i am trying to run some APIs and filtering them by given ip, but the return list seems not expected, is there sth wrong and how to filter hosts by ip list?
k
The
ipv4
filter is not available in the
counts
endpoint. You can see the full list of available parameters here: https://fleetdm.com/docs/using-fleet/rest-api#parameters25
w
is there anyway by fleet api, fleetctl or osqueryi to query all the host by given ip lists?
k
My original advice for that would still be what I would recommend: https://osquery.slack.com/archives/C01DXJL16D8/p1666301340994349?thread_ts=1666296889.627119&cid=C01DXJL16D8 I understand you've run into some oddness with the ip addresses, have you had a chance to run the query @roberto sent over to verify if the upcoming fix will do the trick for you?: https://osquery.slack.com/archives/C01DXJL16D8/p1666627014936249?thread_ts=1666304888.397699&cid=C01DXJL16D8
Just for clarity, while
ipv4
can't be used as a filter for
/hosts/count
, it can be used with
/hosts
And to add some context, this is essentially what is happening behind the scenes when you use the target picker in the Fleet UI.