Bigfix rest api query

Can this be doable vial rest api?

r=requests.get(‘https://abcorg:port/api/query?relevance=if (name of operating system contains “Linux”) then ((names of it, versions of it) of packages of rpm) else nothing’, verify=False,auth=(‘abc’, ‘123’))

print(r.text)

I get this error.

 <Result></Result>
            <Error>The operator "operating system" is not defined.</Error>

Not directly, at least the wayyou are using the query interface. The relevance run through this interface is Session Relevance, which can query objects such as 'bes computers’and ‘bes properties’. It runs on the server, not the clients, and doesn’t have access to client objects.

The most straightforward way to accomplish this is to create an Analysis to retrieve the data you want from the clients, and then query the results in REST via the ‘bes property results’ classes.

There are several postings in the forum on this if you search for ‘bes property’ and also documentation at https://developer.bigfix.com

I hope this points you in the right direction, pleasy reply back if you get stuck.

1 Like

Thanks Jason.
I think I have the created the analysis which generates the report every day e.g package list from the linux. let me see how I can use the “bes property” to get date via “restapi”

check this thread and let us know if it addresses what you need…