Relevance code to get computer ID

Hello Team,

I am running below session relevance code to gather the computer ID with the use of computer host name and i am able to get Computer ID.

https://abc.com:52311/api/query?relevance=(id of it) of bes computers whose (name of it as lowercase starts with  "UXXXXXDXT001" as lowercase ) 

<?xml version="1.0" encoding="UTF-8"?>
<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<Query Resource="(id of it) of bes computers whose (name of it as lowercase starts with  &quot;UXXXXXDXT001&quot; as lowercase )">
<Result>
<Answer type="integer">1763902</Answer>
</Result>
<Evaluation>
<Time>0.676ms</Time>
<Plurality>Plural</Plurality>
</Evaluation>
</Query>
</BESAPI>

But if i try with another host name which is also on-boarded to BigFix console i am not getting any Computer ID.

<?xml version="1.0" encoding="UTF-8"?>
<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
<Query Resource="(id of it) of bes computers whose (name of it as lowercase starts with  &quot;nlleixxxast001&quot; as lowercase)">
<Result></Result>
<Evaluation>
<Time>0.676ms</Time>
<Plurality>Plural</Plurality>
</Evaluation>
</Query>
</BESAPI>

Pls suggest on this.

Does the user account making the API call have access to the computer in the console?

Did you double check how the name appears in the console?

1 Like