Hello community,
We want to fetch a list of IP addresses from a webserver and (dynamically) import them into a host group on our firewall (Sophos XGS3100 Vers.SFOS 20.0.2 MR-2-Build378). Our plan is to use the API along with a Python script that downloads the list(s) and subsequently imports them into the host group via the API.
The download of the list via Python onto a windows machine works fine.
Unfortunately, as we have no prior experience with using the API on Sophos, the import of the list isn’t working yet.
We have activated the API and added the allowed IP addresses. The connection test to the API interface using a user account created on the firewall was successful.
Which components from the API help page (API Documentation) are needed to import the IP addresses from the list into the firewall? Is there perhaps an easier or better way to import the IPs into the firewall?
Maybe someone could also give us an example on how the code should look like :)
Thank you!
Added TAGs
[edited by: Raphael Alganes at 10:18 AM (GMT -8) on 26 Nov 2024]