RESTAPI help need

Hi All,

I am using the below rest api command for getting the results from windows and linux,

https://bigfix.domain.com:52311/api/query?relevance=(( values of results (bes property “user name”, it)) , (values of results (bes property “RAM” , it )), values of results (bes property “BIOS” , it ), values of results (bes property “computer name” , it), values of results (bes property “OS” , it), values of results (bes property “CPU” , it ), values of results (bes property “IP Address” , it), values of results (bes property “Customer_name” , it), values of results (bes property “device type” , it), values of results (bes property “identifying number - windows” , it), values of results (bes property “model”, it), values of results (bes property “number of processors - Linux”, it)) of bes computers

but I am not getting any results,

is that wrong format,

Thanks,
Nagaraj

You may be loosing results due to properties that are do not apply to all computers. If one property only applies to Linux endpoints that would cause all Windows endpoints to drop off the results. Likewise if you have a property that only applies to Windows endpoints, all the Linus ones will drop off the results leaving you with an empty result.

I would look at @brolly33 blog that has been referenced in your other forum post and test using either the presentation debugger in the console or the stand alone session relevance tester so you can develop the correct session relevance expression.

3 Likes

It might be easier to test your relevance in the fixlet debugger or in WebReports QnA first.
https://bigfix.domain.com:8083/webreports?page=QNA

There’s a few things going on here.
First off, when I tested your relevance it doesn’t like the quotation marks - I think the forum post modified them. For future posts to avoid that happening you can add in four spaces before the start of a code block and it will format it like you see below.

There are a few ways to get what you need but following from what you’ve started, the basic statement should be:

values of results from (bes properties "name of prop") of bes computers

So just expand that statement out to include all your properties.

However, you could also use the following statement as well:

(values of property results whose (name of property of it is contained by set of ("RAM";"Computer Name";"OS")) of bes computers)

or depending on how you want the output formatted you could concatenate it:

concatenation of (values of property results whose (name of property of it is contained by set of ("RAM";"Computer Name";"OS")) of bes computers)

or you can add the property name as well as the value outputs:

(names of properties of it, values of it) of property results whose (name of property of it is contained by set of ("RAM";"Computer Name";"OS")) of bes computers
3 Likes

Thanks @SLB for your comments