Use API to get a list of computer groups

hello

trying to understand how to pull a list of all the computers groups in the master action site

tried https://server fqdn:52311/api/computergroups/actionsite and tried https://server fqdn:52311/api/computergroups/masteractionsite

neither work. Thanks for the help

I think it’s

/api/computergroups/master

Let me know if that’s not it and I can check later today.
Edit: autocorrect was wrong

That worked, but what about a custom site that contains groups? For example I have a custom site called BigFix Master Operator Only and when I substitute master for BigFix Master Operator Only I get a error “Requested Resource Does Not Exist”.

I have also tried https://FQDN:52311/api/computergroups/site/custom/BigFix_Master_Operator_Only and https://FQDN:52311/api/sites/computergroups/Customsite_BigFix_Master_Operator_Only

Try “https://FQDN:52311/api/computergroups/custom/BigFix%20Master%20Operator%20Only”, this worked for me.

Agree with @Spirillen, site URLs will be URL-encoded so spaces are represented by %20, and several other characters may be replaced as well.

When in doubt, a query https://lab.bigfix.me:52311/api/sites will return a list of all sites, use the ‘Resource’ attributes to find the URL definitions of each site, i.e.

<?xml version="1.0" encoding="UTF-8"?>
<BESAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BESAPI.xsd">
  <ExternalSite Resource="http://lab.bigfix.me:52311/api/site/external/BES%20Support">
    <Name>BES Support</Name>
    <DisplayName>BES Support</DisplayName>
  </ExternalSite>
  <OperatorSite Resource="http://lab.bigfix.me:52311/api/site/operator/BigFixAdmin">
    <Name>BigFixAdmin</Name>
    <DisplayName>BigFixAdmin's Operator Site</DisplayName>
  </OperatorSite>
  <ActionSite Resource="http://lab.bigfix.me:52311/api/site/master">
    <Name>ActionSite</Name>
    <DisplayName>Master Action Site</DisplayName>
  </ActionSite>
</BESAPI>

https://developer.bigfix.com/rest-api/api/site.html

Thanks everyone for the help