Important note about SSL VPN compatibility for 20.0 MR1 with EoL SFOS versions and UTM9 OS. Learn more in the release notes.

Sophos XGS : Bulk Rename of IP Hosts and IP Host Groups via API

Hello,

I need assistance with bulk renaming various objects such as IP Hosts and IP Host Groups on Sophos Firewall through the API. Could someone guide me on the best practices or provide a step-by-step procedure for this task?

Thank you in advance for your help!

Best regards,
Gaëtan Voltolini



Added TAGs
[edited by: Erick Jan at 10:54 PM (GMT -8) on 7 Nov 2024]
Parents
  • Hi  ,

    Thank you for reaching out to the community, Please refer the sample below from the API GUIDE HERE.

                   <IPHost>

                                  <Name>name</Name>

                                  <IPFamily>IPv4/IPv6</IPFamily><!-- default IPv4 -->

                                  <Description>Text</Description>

                                  <HostType>IP/Network/IPRange/IPList</HostType>

                                  <IPAddress>1.1.1.1</IPAddress><!-- for type IP only -->

                                  <!-- For Network Type -->

                                  <IPAddress>1.1.1.1</IPAddress>

                                  <Subnet>128.0.0.0</Subnet>

                                  <!-- Network type ends -->

                                  <!-- For IPRange -->

                                  <StartIPAddress>startIPaddress</StartIPAddress>

                                  <EndIPAddress>endIPaddress</EndIPAddress>

                                  <!-- IPRange type ends -->

                                  <!-- For IPList type -->                                   <ListOfIPAddresses>192.168.1.125,192.236.25.1</ListOfIPAddresses>

                                  <!-- Network type ends -->

                                  <HostGroupList>

                                                 <HostGroup>hostgroupname</HostGroup>

                                                 <HostGroup>hostgroupname</HostGroup>

                                                 <HostGroup>hostgroupname</HostGroup>

                                                 :----------------------------------------------------------------:

                                  </HostGroupList>

                   </IPHost>

    <IPHostGroup>

                                   <Name>name</Name>

                                   <IPFamily>IPv4/IPv6</IPFamily><!-- default IPv4 -->

                                   <Description>Text</Description>

                                   <HostList>

                                                  <Host>Hostname</Host>

                                                  <Host>Hostname</Host>

                                                  <Host>Hostname</Host>

                                                  <Host>Hostname</Host>

                                   </HostList>

                   </IPHostGroup>




    Thanks & Regards,
    _______________________________________________________________

    Vivek Jagad | Team Lead, Technical Support, Global Customer Experience

    Log a Support Case | Sophos Service Guide
    Best Practices – Support Case  | Security Advisories 
    Compare Sophos next-gen Firewall | Fortune Favors the prepared
    Sophos Community | Product Documentation | Sophos Techvids | SMS
    If a post solves your question please use the 'Verify Answer' button.

  • Hi Vivek,

    Thanks for your answer.

    I have read the documentation and made many tests, But  i don't understand how to change the name of the object? 

    As I have understood, it's used as an "ID" for the change.

    Thanks

Reply Children
No Data