Bug in Inventory API

Hello all,

Hoping for some insight. We have recently begun to use BFI quite extensively using the API. We are trying to use the API call for hardware report v2 (https://help.hcltechsw.com/bigfix/10.0/inventory/Inventory/integration/c_rest_api_hardware.html)

Using the query as provided for a detailed report:

api/sam/v2/computers?columns[]=id&columns[]=bigfix_id
&columns[]=computer_group_id&columns[]=name&columns[]=dns_name
&columns[]=ip_address&columns[]=os&columns[]=os_type
&columns[]=first_seen&columns[]=last_seen&columns[]=is_deleted
&columns[]=deletion_date&columns[]=is_managed_by_vm_manager
&token=######

It returns the data correctly, but here is where the bug lies, the computer_group_id for every computer is 0, even if is in another computer group. I did file a ticket, but was told that the API cannot be depended on. When I directly query the database using the fields (as pulled from the internal ruby file), the information is correct. It seems inconceivable that support would say that we cannot depend on the API.

Can you please share the case #? I think you had posted another message related to the BFI Computer Groups.

From what I understand, the API extraction is tied to the user role/group assigned and can extract data for specific computer group assigned to the user. Since the group 0 is the default group for all computers, the API is probably extracting data for all computers for this user.

To confirm, create another user, assign the user to a specific computer group and run the API extraction with that user token. You should see the data specific to that computer group.

There is one REF/idea that could be suitable to this: https://bigfix-ideas.hcltechsw.com/ideas/I-I-27
Please vote for this idea to help increase it’s priority

BigFix Inventory documentation includes unintentionally column computer_group_id for API’s v2/computers and v2/software_instances. This is an internal column used for the restricting access only to the computers belonging to main computer group of the user executing query.
As it is already involved in the query to the specific value it cannot be used with other criteria to provide filtering to computers belonging to specific computer group.
Currently in API we are not providing / exposing ability to filter computer based on Computer Groups / Data Source Computers Groups. It is limited to the UI only.
Please share the use cases for which you would like to use filtering based on the computer groups. As mentioned above having different users for each computer group you will provide listing for that group.