Creating Automatic Group from a file

Hello,

My apologies if this has been asked before.

I have a new customer I need to create Automatic groups for which will contain hundreds of endpoints. I’d like to be able to populate the group with the machine names from a file (most likely a txt file, as it might be difficult to parse a CSV). To my understanding, it might be best to use the REST API to do this. However, I am fairly new to using that and have only really used the tutorials, so not sure what the exact syntax would be and the resulting XML. I’m attempting to use Postman via Chrome.

Any help / suggestions are much appreciated. Thanks.

Hello,
Do those endpoints have anything in common which we could get by relevance statement? If yes, create a group using that statement. If not, I think the best way is to generate XML from the txt file. The resulting XML should look like

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
        <ComputerGroup>
        <Title>Group Name</Title>
        <Domain>BESC</Domain>
        <JoinByIntersection>false</JoinByIntersection>
        <SearchComponentPropertyReference PropertyName="Computer Name" Comparison="Equals">
                <SearchText>Name1</SearchText>
                <Relevance></Relevance>
        </SearchComponentPropertyReference>
        <SearchComponentPropertyReference PropertyName="Computer Name" Comparison="Equals">
                <SearchText>Name2</SearchText>
                <Relevance></Relevance>
        </SearchComponentPropertyReference>
        <SearchComponentPropertyReference PropertyName="Computer Name" Comparison="Equals">
                <SearchText>NameX</SearchText>
                <Relevance></Relevance>
        </SearchComponentPropertyReference>
</ComputerGroup>
</BES>

Then the REST call would have the XML above as request body and
Method: POST
URL:
https://<bigfix_server>:52311/api/computergroups/master (for master action site)
https://<bigfix_server>:52311/api/computergroups/external/<name> (for external site)
https://<bigfix_server>:52311/api/computergroups/custom/<name> (for custom site)
https://<bigfix_server>:52311/api/computergroups/operator/<name> (for operator site)
Authentication: basic
Content-Type: application/xml