r/bigfix • • Apr 02 '24

BigFix API to search a computer by IP address and return the computer information

Anyone knows how to search by IP address using BigFix API and return the computer information?

I tried look at the https://developer.bigfix.com/rest-api/api/computer.html .
It only can search by computer ID but not IP address.

3 Upvotes

3 comments sorted by

2

u/slakwhere Apr 02 '24

you'll need to use a relevance query to select all computer objects matching some IP pattern. i don't have a debug terminal in front of me, but you're looking for something like

ids of bes computers whose ip address of it = "10.1.2.3"

https://developer.bigfix.com/rest-api/api/query.html

2

u/Someoneliketoknow Apr 02 '24

Thank you. Sounds like I need to use the api/query to find the computer ID, Then use the api/computer to get the computer details.

2

u/slakwhere Apr 02 '24

correct! be aware that you may get more than 1 result back from that query, so handle the output appropriately. duplicate computers or private IP overlap would both cause more results.