How to get the Hardware Inventory Server ID using the REST API?

Hello,

When I go to BigFix Inventory -> Reports -> Computers -> A specific computer -> Hardware Inventory tab

I will see a field called “Server ID”.

I need to get this field using the BigFix REST API but I cannot find it. I have been playing with the

api/computer/{computer id}

and

api/computer/{computer id}/settings

endpoints but they do not contain the Server ID. Is it possible to get the server ID using the BigFix REST API? And if yes, where can I find it?

And if it is not possible, where can I find this field in the database, so that I can query it from the database?

Thanks

You want to use the BigFix Inventory REST API Instead of the BigFix Platform API.
Seems like this is the specif endpoint you are interested in.

For the Computers, there is a newer V2 API api/sam/v2/computers. The Server ID is in a different API resource computer_hardware.

The BFI APIs provide an option to associate (join) different API resources to get different data sets.

Here is an example query to combine computers and computer_hardware resources to get the Server ID information. Replace SeverID:PORT with your BFI info to test the API from a browser, after logging in.

https://SeverID:PORT/api/sam/v2/computers?columns[]=id&columns[]=name&columns[]=dns_name&columns[]=ip_address&columns[]=os&columns[]=computer_hardware.server_serial_number&columns[]=computer_health.last_scan_attempt&criteria={“and”:[[“is_deleted”,"=",“0”]]}

The following documenation provides more details about the available associations and how to use them.

https://help.hcltechsw.com/bigfix/10.0/inventory/Inventory/integration/r_get_computers_v2.html

Hello, I tried using the following endpoint:

myurl:myPortNumber/api/sam/v2/computers

Which gives me the following response from the server:

400 Bad Request
unknown request method

This is the same server where I (sucesfully) retreived the data using the other REST API as described in the OP

You need to be logged into the BFI UI and then open a new tab to run the query from the browser. The query should be https://Server:PORT/api/sam/v2/computers

I didn’t realize the APIs you had mentioned are for the platform and not for BFI. The ServerID information is obtained by the BFI HW scanner and will be available in BFI database

Thank you Ssakunala, I managed to retrieve the information in the way that you described it.