Issuing a action to a manual group via REST api

Hello
When I use the rest api to take a action on an automatic group that is part of the master action site I use the relevance exists true whose( if true then(member of group1234 of sites) else false) which works fine. However if the group I am targeting is a manual group the action does not run. Is there something unique to how I would target a manual group, both are in the master action site.

I was also wondering what if the group belongs to a customsite? Would that also change the relevance?

The relevance for checking automatic group membership is defined as:

 member of <site group> : boolean

https://developer.bigfix.com/relevance/reference/site-group.html#member-of-site-group-boolean

and a “site group” can be constructed as group <integer> of <site> : site group and the site can be constructed as usual:

site <string> : site

https://developer.bigfix.com/relevance/reference/site.html

So for example if you have an automatic group in a custom site named “TestCustomSite” the relevance would become:

exists true whose ( if true then ( member of group 1234 of site "CustomSite_TestCustomSite" ) else false )

For manual group the implementation is completely different being the set of members static. We have an inspector for that (available starting with 9.1) https://developer.bigfix.com/relevance/reference/manual-group.html which you can use as:

exists true whose ( if true then ( member of manual group "TheNameOfYourManualGroup" of client ) else false )

https://developer.bigfix.com/relevance/reference/manual-group.html#member-of-manual-group-boolean

if you happen to use Server Based Groups we have a relevance for that as well https://developer.bigfix.com/relevance/reference/server-based-group.html#member-of-server-based-group-boolean

Just a little note: the REST API are not able to optimize taking action of a manual group as the console would. Because the manual group is fixed the console can read who is member of the group and send the action using the mailbox. When you instead use the REST API you’re using always the Dynamic Targeting.

6 Likes

Thank you very much for the clarification.