Need to add criteria computer group id=150 on API call

Hi I need to create an API call from the computer v2

https://9.XXX7:9081/api/sam/v2/computers?token=8XXX76&criteria={computer_group_id=150}

But it is not working. Documentation says

boolean-operator> ::= “and” | “or”
::= |
::=
::=
::= | | |
https://www.ibm.com/support/knowledgecenter/en/SSKLLW_9.5.0/com.ibm.bigfix.inventory.doc/Inventory/integration/r_get_computers_v2.html

Someone can help me?
Thanks!

You need to follow the syntax of the criteria examples they give, like

URL?criteria={"and":[["first_seen", ">", "1970-01-01T00:00:00+00:00Z"], ["first_seen", "<", "1970-01-02T00:00:00+00:00Z"]]}

So yours should be

https:/.../computers?token=XXXX&criteria={"and":[["computer_group_id", "=", "150"]]}
1 Like