Closed c2mfj closed 1 month ago
The hostname
filter in the Devices API defaults to partial search in the way that you used it (hostname:'AA'
with match AA
, AA1
, AA2
, etc.). If you do use an asterisk, it is only supported at the start or the end of the string. It can't be used in the middle.
Description of your question Is there a way to use a leading wildcard when filtering for hostname? I found where hostname uses partial by default but it seems to only work by matching the first characters in the string and auto appending an '' to the end of the string. It also works if you add the trailing asterisk yourself. I am trying to perform a search like `AA1234
or
*1234`.To Reproduce Have hostnames of: AAVWXYZ1 AAVWXYZ2 AAVWXYZ3 AAVWXYZ4 AAVWXYZ5
AALMNOP1 AALMNOP2 AALMNOP3 AALMNOP4 AALMNOP5
Get-FalconHost -Filter "hostname:'AA'"
andGet-FalconHost -Filter "hostname:'AA*'"
yields all hostnames listedhowever:
Get-FalconHost -Filter "hostname:'*VWXYZ'"
yields no results but should return the first 5 hosts in the list.Get-FalconHost -Filter "hostname:*'*VWXYZ'"
returns an error of "Cannot validate argument on parameter 'Filter'"Expected behavior A leading asterisk prior to the search string would yield the expected hostnames.
Environment (please complete the following information):
Additional context Add any other context about the problem here.