BES API Target Endpoints by Property

We are looking for a method to target endpoints for an action created via API by value of custom property. I know there are different parameters when defining the target in the action xml file. I assume would be the way to go here… Something like value of bes property “specific property” = “123”.

Any insight here would be greatly appreciated.

I believe through the API you’d.habe to target using <CustomRelevance>, and duplicate the property’s source relevance.
(That’s actually what the console does as well)
So you’ll need to retrieve the property’s relevance first, and then build a CustomRelevance statement based on that.

@JasonWalker thanks for the feedback. So to provide more insight here. We are wanting to target by value set on the client’s registry. This today is being collected as a BES property:

value "ID" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Key" of native registry as string

If we wanted to leverage that in the target field within an action XML how would we specify that? I feel as we are semi in the right direction. If we wanted to target by value of this specific property perhaps we would do something like the below? If we were to target a client that had a value of “1234” as it’s ID in the registry:

    <?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
 <SourcedFixletAction>
   <SourceFixlet>
     <Sitename>Windows Patches</Sitename>
     <FixletID>121</FixletID>
     <Action>Action1</Action>
   </SourceFixlet>
   <Target>
     <CustomRelevance>value "ID" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Key" of native registry as string = 1234</CustomRelevance>>
   </Target>
  <Parameter></Parameter>
 </SourcedFixletAction>
</BES>

Very very close…for this case I think all you need is to wrap “1234” in quotes.

In the general case, you can add a statement to handle a bit of error trapping as in

exists (ORIGINAL RELEVANCE) whose (it as string = "EXPECTED VALUE")

1 Like

That did the trick. Thank you very much!