BFI multiple criteria parameter queries

I’m trying to pull back some data from the BigFix Inventory API that returns all endpoints that:

  1. is_deleted=0
  2. last attempted to scan within X days
  3. had a successful scan for the filesystem, catalog, idtag and package

When I try this, I get data back but the criteria doesn’t seem to be using “AND” as intended as I cam getting all computers. Should all the criteria be within a single “&criteria=” ? Does anyone have an example of multiple criteria in a single call?

https://xxxxx/api/sam/v2/computers?columns[]=id&token=xx&criteria={“and”:[[“is_deleted”,"=",“0”]]}&criteria={“and”:[[“computer_health.last_scan_attempt”,“last”,“P90D”]]}&criteria={“and”:[[“computer_health.is_filesys_scan_successful”,"=",true]]}&criteria={“and”:[[“computer_health.is_catalog_scan_successful”,"=",true]]}&criteria={“and”:[[“computer_health.is_idtag_scan_successful”,"=",true]]}&criteria={“and”:[[“computer_health.is_package_scan_successful”,"=",true]]}

1 Like

i think I got it working:

https://xxxxx/api/sam/v2/computers?columns[]=id&token=xxxxxx&criteria={“and”:[[“is_deleted”,"=",“0”],[“computer_health.last_scan_attempt”,“last”,“P90D”],[“computer_health.is_filesys_scan_successful”,"=",true],[“computer_health.is_catalog_scan_successful”,"=",true],[“computer_health.is_idtag_scan_successful”,"=",true],[“computer_health.is_package_scan_successful”,"=",true]]}