BigFix API How to get all computer names?

Hi,

Is there a way to list all the computer names by using BigFix API? So far it seems that https://bigfix server:52311/api/computers returns only all Computer IDs, which is not what we need.

Thanks in advance!

You could do something like this:

https://bigfixserver:52311/api/query?relevance=(name of it) of BES Computers

1 Like

Hi robbac,

As mentioned by mikel, you can use the REST API /api/query but don’t forget it requires WebReports installed https://developer.bigfix.com/rest-api/api/query.html.

Otherwise, if a WebReports is not available, you can process the list returned by /api/computers and call /api/computer/ (https://developer.bigfix.com/rest-api/api/computer.html) for each os them, filtering the response by the property Computer Name in this way:
/api/computer/1234?fields=Property<Name=Computer%20Name>

1 Like

Thanks! Worked like a charm. Sad that it’s XML though, not JSON.

Add “output=json” to the parameters and you’ll get results in JSON instead of XML.

https://bigfixserver:52311/api/query?output=json&relevance=(name of it) of BES Computers

1 Like

Thanks! I guess you have answers to all of it. :slight_smile: Great help!

1 Like