BigFix Inventory Question

Hello

I want to leverage the BFI api to get information in a saved report I created. Pulling back software instance information works using this

https:/my_bfi_server:9081/api/sam/v2/software_instances?token=my_token

However if I substiture my_saved_report name for software_instances I get a error message that the page doesn’t exists. This fails

https:/my_bfi_server:9081/api/sam/v2/my_saved_report?token=my_token

I also tried using the folowing and it also failed

https:/my_bfi_server:9081/api/sam/my_saved_report?token=my_token

How can I leverage the BFI API to use reports I have created? Thank you very much

Hello

I have also tried

https:/my_bfi_server:9081/api/reports/36?token=my_token but I am not seeing any report data just the http response body information in JSON.

There are no APIs to extract custom reports. If the report is a filtered Software Instances data, similar filters can be applied to the API call using criteria and extract required subset of data.

criteria: Retrieve records which match specific conditions. The parameter should have the following structure, written in one line
https://help.hcltechsw.com/bigfix/10.0/inventory/Inventory/integration/r_get_software_instances_v2.html

Thank you, would you have an example?

Here is an example to extract software instances discovered after 08/20/2020 and Product Name contains “UrbanCode”

https://MY_BFI_Server:9081/api/sam/v2/software_instances?criteria={ “and”: [ [“discovery_start”, “>”, “2020-08-20T00:00:00+00:00Z”], [“product_name”, “contains”, “urbancode”] ] }

Thank you for the sample but not quite what I am after. So just so I am clear, if I configure my view to add columns I am interested in to a basic software classification report there is no way I can leverage the api to export that data into another system? If that is true, whats the point of having a api? seems to me that would be a basic requirement. What about the information at this liink https://help.hcltechsw.com/bigfix/9.5/inventory/Inventory/integration/c_api_import_export_saved_reports.html

The API has options to extract all default columns or specific columns using columns and criteria:

columns[] Specify which columns to retrieve. If you do not specify this parameter, only default columns are retrieved.
Example:
GET api/sam/v2/software_instances?columns[]=discovery_path
&columns[]=instance_id&columns[]=computer_id&columns[]=computer_bigfix_id
&columns[]=computer_dns_name&columns[]=computer_group_id&columns[]=computer_name
&columns[]=computer_ip_address&columns[]=computer_os&columns[]=computer_os_type
&columns[]=component_name&columns[]=component_release&columns[]=discoverable_guid
&columns[]=component_publisher_name&columns[]=component_has_usage&columns[]=is_present
&columns[]=discovery_start&columns[]=discovery_end&columns[]=product_name
&columns[]=product_publisher_name&columns[]=product_release_name&columns[]=product_release
&columns[]=metric_id&columns=metric_code_name&columns[]=is_confirmed
&columns[]=is_excluded&columns[]=is_suppressed&columns[]=exclusion_or_suppress_comment
&token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623

The data from saved reports can be exported as CSV on a scheduled basis that gives similar output.

The link you mentioned is to export report definition from one BFI and import it into another BFI (say from Dev env to Prod etc).

2 Likes