With the REST API output the 2 properties results - not sure how to change to session relevance to retrieve results

I have a analysis that collects 2 properties shown below. I would like to use the REST API to output the results for these two properties. I was trying to use the however it requires the 2 lines to be changed to session relevance. So I am looking for assistance on how best to approach this requirement?

Session relevance required
https://<bigfix_server>:52311/api/query?relevance={relevance statement}

Analysis with 2 properties

Property 1
((lines starting with “Cylance Cloud” of file (parent folder of client as string & “\Cloud\Cloud.txt”) as string))

Property 2
((lines starting with “RedCloak Cloud” of file (parent folder of client as string & “\Cloud\Cloud.txt”) as string))

You’ll want to use the bes property inspector for this.

Assuming the property names are unique, one way to go might be:

(names of computers of it, values of it) of results of bes property "Property 1"

If the Analysis name is unique, but the property name is not:

 (names of computers of it, values of it) of results of bes property "Property 1" whose (name of source analysis of it is "Analysis 1")

If the Analysis name is not unique, you’ll have to incorporate it in the session relevance along with the site it belongs to.

Another option is to use the ID. The relevance below will return the IDs of all your properties.

(names of it, ids of it) of bes properties 

Then you can use:

 (names of computers of it, values of it) of results of bes property whose (id of it is (<siteID>, <analysisID>, <propertyID>)

Note the space after the comma in the tuple used as the ID for the property.

I have tested the session relevance and it worked for both. I will test the rest api and let you know. thanks again.

Just tested the rest api query and that is working as well. Thanks again for your assistance.

1 Like